public class ZMQ extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ZMQ.Context
Inner class: Context.
|
static class |
ZMQ.Error
Inner class: Error.
|
static class |
ZMQ.Event
Inner class: Event.
|
static class |
ZMQ.Poller
Inner class: Poller.
|
static class |
ZMQ.PollItem |
static class |
ZMQ.Socket
Inner class: Socket.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEALER
Flag to specify a DEALER socket (aka XREQ).
|
static int |
DONTWAIT |
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 by the java binding.
|
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_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 |
FORWARDER
Flag to specify a FORWARDER device.
|
static int |
NOBLOCK
Socket flag to indicate a nonblocking send or recv mode.
|
static int |
PAIR
Flag to specify a exclusive pair of items.
|
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 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.
|
Constructor and Description |
---|
ZMQ() |
Modifier and Type | Method and Description |
---|---|
static ZMQ.Context |
context(int ioThreads)
Create a new Context.
|
protected static long |
EADDRINUSE() |
protected static long |
EADDRNOTAVAIL() |
protected static long |
ECONNREFUSED() |
protected static long |
EFSM() |
protected static long |
EHOSTUNREACH() |
protected static long |
EINPROGRESS() |
protected static long |
EMTHREAD() |
protected static long |
ENETDOWN() |
protected static long |
ENOBUFS() |
protected static long |
ENOCOMPATPROTO() |
protected static long |
ENOTSOCK() |
protected static long |
ENOTSUP() |
protected static long |
EPROTONOSUPPORT() |
protected static long |
ETERM() |
static int |
getFullVersion() |
static int |
getMajorVersion() |
static int |
getMinorVersion() |
static int |
getPatchVersion() |
static String |
getVersionString() |
protected static int |
make_version(int major,
int minor,
int patch) |
static int |
makeVersion(int major,
int minor,
int patch) |
static int |
poll(ZMQ.PollItem[] items,
int count,
long timeout)
Poll on polling items until timeout
|
static int |
poll(ZMQ.PollItem[] items,
long timeout)
Poll on polling items until timeout
|
static void |
proxy(ZMQ.Socket frontend,
ZMQ.Socket backend,
ZMQ.Socket capture)
Starts the built-in 0MQ proxy in the current application thread.
|
protected static int |
version_full() |
protected static int |
version_major() |
protected static int |
version_minor() |
protected static int |
version_patch() |
public static final int NOBLOCK
public static final int DONTWAIT
public static final int SNDMORE
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
public static final int EVENT_CONNECT_RETRIED
public 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 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()
public static void 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)
items
- polling itemstimeout
- timeout in millisecondpublic static int poll(ZMQ.PollItem[] items, int count, long timeout)
items
- polling itemscount
- active item counttimeout
- timeout in millisecondprotected static int version_full()
protected static int version_major()
protected static int version_minor()
protected static int version_patch()
protected static int make_version(int major, int minor, int patch)
protected static long ENOTSUP()
protected static long EPROTONOSUPPORT()
protected static long ENOBUFS()
protected static long ENETDOWN()
protected static long EADDRINUSE()
protected static long EADDRNOTAVAIL()
protected static long ECONNREFUSED()
protected static long EINPROGRESS()
protected static long EHOSTUNREACH()
protected static long EMTHREAD()
protected static long EFSM()
protected static long ENOCOMPATPROTO()
protected static long ETERM()
protected static long ENOTSOCK()
public static ZMQ.Context context(int ioThreads)
ioThreads
- Number of threads to use, usually 1 is sufficient for most use cases.