/
ZhttpServerOptions.java
86 lines (84 loc) · 2.63 KB
/
ZhttpServerOptions.java
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Read the zproject/README.md for information about making permanent changes. #
################################################################################
*/
package org.zeromq.czmq;
import org.zeromq.tools.ZmqNativeLoader;
public class ZhttpServerOptions implements AutoCloseable {
static {
ZmqNativeLoader.loadLibrary("zmq", true);
ZmqNativeLoader.loadLibrary("uuid", true);
ZmqNativeLoader.loadLibrary("libsystemd", true);
ZmqNativeLoader.loadLibrary("lz4", true);
ZmqNativeLoader.loadLibrary("curl", true);
ZmqNativeLoader.loadLibrary("nss", true);
ZmqNativeLoader.loadLibrary("microhttpd", true);
ZmqNativeLoader.loadLibrary("czmq", true);
ZmqNativeLoader.loadLibrary("czmqjni", false);
}
public long self;
/*
Create a new zhttp_server_options.
*/
native static long __new ();
public ZhttpServerOptions () {
/* TODO: if __new fails, self is null... */
self = __new ();
}
public ZhttpServerOptions (long pointer) {
self = pointer;
}
/*
Create options from config tree.
*/
native static long __fromConfig (long config);
public static ZhttpServerOptions fromConfig (Zconfig config) {
return new ZhttpServerOptions (__fromConfig (config.self));
}
/*
Destroy the zhttp_server_options.
*/
native static void __destroy (long self);
@Override
public void close () {
__destroy (self);
self = 0;
}
/*
Get the server listening port.
*/
native static int __port (long self);
public int port () {
return __port (self);
}
/*
Set the server listening port
*/
native static void __setPort (long self, int port);
public void setPort (int port) {
__setPort (self, port);
}
/*
Get the address sockets should connect to in order to receive requests.
*/
native static String __backendAddress (long self);
public String backendAddress () {
return __backendAddress (self);
}
/*
Set the address sockets should connect to in order to receive requests.
*/
native static void __setBackendAddress (long self, String address);
public void setBackendAddress (String address) {
__setBackendAddress (self, address);
}
/*
Self test of this class.
*/
native static void __test (boolean verbose);
public static void test (boolean verbose) {
__test (verbose);
}
}