public class ZMQ extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ZMQ.Context |
static class |
ZMQ.Error |
static class |
ZMQ.Event
Inner class: Event.
|
static class |
ZMQ.Poller |
static class |
ZMQ.PollItem |
static class |
ZMQ.Socket |
Modifier and Type | Field and Description |
---|---|
static Charset |
CHARSET |
static int |
DEALER
Flag to specify a DEALER socket (aka XREQ).
|
static int |
DONTWAIT
Socket flag to indicate a nonblocking send or recv mode.
|
static int |
DOWNSTREAM
Deprecated.
|
static int |
EVENT_ACCEPT_FAILED
EVENT_ACCEPT_FAILED: could not accept client connection.
|
static int |
EVENT_ACCEPTED
EVENT_ACCEPTED: connection accepted to bound interface.
|
static int |
EVENT_ALL
EVENT_ALL: all events known.
|
static int |
EVENT_BIND_FAILED
EVENT_BIND_FAILED: socket could not bind to an address.
|
static int |
EVENT_CLOSE_FAILED
EVENT_CLOSE_FAILED: connection couldn't be closed.
|
static int |
EVENT_CLOSED
EVENT_CLOSED: connection closed.
|
static int |
EVENT_CONNECT_DELAYED
EVENT_CONNECT_DELAYED: synchronous connect failed, it's being polled.
|
static int |
EVENT_CONNECT_RETRIED
EVENT_CONNECT_RETRIED: asynchronous connect / reconnection attempt.
|
static int |
EVENT_CONNECTED
EVENT_CONNECTED: connection established.
|
static int |
EVENT_DELAYED
Deprecated.
|
static int |
EVENT_DISCONNECTED
EVENT_DISCONNECTED: broken session.
|
static int |
EVENT_LISTENING
EVENT_LISTENING: socket bound to an address, ready to accept connections.
|
static int |
EVENT_MONITOR_STOPPED
EVENT_MONITOR_STOPPED: monitor has been stopped.
|
static int |
EVENT_RETRIED
Deprecated.
|
static int |
FORWARDER
Flag to specify a FORWARDER device.
|
static byte[] |
MESSAGE_SEPARATOR |
static int |
NOBLOCK |
static int |
PAIR
Flag to specify a exclusive pair of sockets.
|
static int |
PUB
Flag to specify a PUB socket, receiving side must be a SUB or XSUB.
|
static int |
PULL
Flag to specify the receiving part of a PUSH socket.
|
static int |
PUSH
Flag to specify a PUSH socket, receiving side must be a PULL.
|
static int |
QUEUE
Flag to specify a QUEUE device.
|
static int |
REP
Flag to specify the receiving part of a REQ socket.
|
static int |
REQ
Flag to specify a REQ socket, receiving side must be a REP.
|
static int |
ROUTER
Flag to specify ROUTER socket (aka XREP).
|
static int |
SNDMORE
Socket flag to indicate that more message parts are coming.
|
static int |
STREAMER
Flag to specify a STREAMER device.
|
static int |
SUB
Flag to specify the receiving part of the PUB or XPUB socket.
|
static byte[] |
SUBSCRIPTION_ALL |
static int |
UPSTREAM
Deprecated.
|
static int |
XPUB
Flag to specify a XPUB socket, receiving side must be a SUB or XSUB.
|
static int |
XREP
Deprecated.
As of release 3.0 of zeromq, replaced by
ROUTER |
static int |
XREQ
Deprecated.
As of release 3.0 of zeromq, replaced by
DEALER |
static int |
XSUB
Flag to specify the receiving part of the PUB or XPUB socket.
|
Modifier and Type | Method and Description |
---|---|
static ZMQ.Context |
context(int ioThreads)
Create a new Context.
|
static boolean |
device(int type,
ZMQ.Socket frontend,
ZMQ.Socket backend)
Deprecated.
|
static int |
getFullVersion() |
static int |
getMajorVersion() |
static int |
getMinorVersion() |
static int |
getPatchVersion() |
static String |
getVersionString() |
static int |
makeVersion(int major,
int minor,
int patch) |
static int |
poll(ZMQ.PollItem[] items,
int count,
long timeout) |
static int |
poll(ZMQ.PollItem[] items,
long timeout) |
static boolean |
proxy(ZMQ.Socket frontend,
ZMQ.Socket backend,
ZMQ.Socket capture)
Starts the built-in 0MQ proxy in the current application thread.
|
public static final int SNDMORE
public static final int DONTWAIT
public static final int NOBLOCK
public static final int PAIR
public static final int PUB
public static final int SUB
public static final int REQ
public static final int REP
public static final int DEALER
public static final int XREQ
DEALER
public static final int ROUTER
public static final int XREP
ROUTER
public static final int PULL
public static final int PUSH
public static final int XPUB
public static final int XSUB
public static final int STREAMER
public static final int FORWARDER
public static final int QUEUE
@Deprecated public static final int UPSTREAM
PULL
,
Constant Field Values@Deprecated public static final int DOWNSTREAM
PUSH
,
Constant Field Valuespublic static final int EVENT_CONNECTED
public static final int EVENT_CONNECT_DELAYED
@Deprecated public static final int EVENT_DELAYED
EVENT_CONNECT_DELAYED
,
Constant Field Valuespublic static final int EVENT_CONNECT_RETRIED
@Deprecated public static final int EVENT_RETRIED
EVENT_CONNECT_RETRIED
,
Constant Field Valuespublic static final int EVENT_LISTENING
public static final int EVENT_BIND_FAILED
public static final int EVENT_ACCEPTED
public static final int EVENT_ACCEPT_FAILED
public static final int EVENT_CLOSED
public static final int EVENT_CLOSE_FAILED
public static final int EVENT_DISCONNECTED
public static final int EVENT_MONITOR_STOPPED
public static final int EVENT_ALL
public static final byte[] MESSAGE_SEPARATOR
public static final byte[] SUBSCRIPTION_ALL
public static final Charset CHARSET
public static ZMQ.Context context(int ioThreads)
ioThreads
- Number of threads to use, usually 1 is sufficient for most use cases.@Deprecated public static boolean device(int type, ZMQ.Socket frontend, ZMQ.Socket backend)
public static boolean proxy(ZMQ.Socket frontend, ZMQ.Socket backend, ZMQ.Socket capture)
frontend
- ZMQ.Socketbackend
- ZMQ.Socketcapture
- If the capture socket is not NULL, the proxy shall send all messages, received on both
frontend and backend, to the capture socket. The capture socket should be a
ZMQ_PUB, ZMQ_DEALER, ZMQ_PUSH, or ZMQ_PAIR socket.public static int poll(ZMQ.PollItem[] items, long timeout)
public static int poll(ZMQ.PollItem[] items, int count, long timeout)
public static int getMajorVersion()
public static int getMinorVersion()
public static int getPatchVersion()
public static int getFullVersion()
public static int makeVersion(int major, int minor, int patch)
major
- Version major component.minor
- Version minor component.patch
- Version patch component.public static String getVersionString()
Copyright © 2017. All Rights Reserved.