File: uwsgi.java

package info (click to toggle)
uwsgi 2.0.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,564 kB
  • sloc: ansic: 87,066; python: 7,004; cpp: 1,133; java: 708; perl: 678; sh: 585; ruby: 555; makefile: 148; xml: 130; cs: 121; objc: 37; php: 28; erlang: 20; javascript: 11
file content (48 lines) | stat: -rw-r--r-- 1,543 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import java.io.*;
import java.util.*;

public class uwsgi {

	static HashMap<String,Object> opt;	

	public static class RequestBody extends InputStream {
		public native int read();
		public native int read(byte[] b);
		public native int readLine(byte[] b);
		public native int available();
		public native void seek(int pos);
	}

	public interface SignalHandler {
		void function(int signum);
	}

	public interface RpcFunction {
		String function(String... args);
	}

	public static native int worker_id();

	public static native void register_signal(int signum, String target, SignalHandler sh);

	public static native void register_rpc(String name, RpcFunction rf);

	public static native void lock();
	public static native void unlock();
	public static native void lock(int locknum);
	public static native void unlock(int locknum);

	public static native byte[] cache_get(String key);
	public static native byte[] cache_get(String key, String cache);
	public static native void cache_set(String key, byte[] value);
	public static native void cache_update(String key, byte[] value);
	public static native void cache_set(String key, byte[] value, int expires);
	public static native void cache_update(String key, byte[] value, int expires);
	public static native void cache_set(String key, byte[] value, int expires, String cache);
	public static native void cache_update(String key, byte[] value, int expires, String cache);

	public static native void alarm(String alarm, String msg);

	public static native String rpc(String... args);

}