public static class ZMQ.Context extends Object implements Closeable
| Modifier | Constructor and Description |
|---|---|
protected |
Context(int ioThreads)
Class constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Destroys the ØMQ context context.
|
boolean |
close(Selector selector)
Closes a Selector that was created within this context.
|
boolean |
getBlocky()
Deprecated.
use
isBlocky() instead |
int |
getIOThreads()
The size of the 0MQ thread pool to handle I/O operations.
|
boolean |
getIPv6() |
int |
getMaxSockets()
The maximum number of sockets allowed on the context
|
boolean |
isBlocky() |
boolean |
isClosed() |
boolean |
isIPv6() |
boolean |
isTerminated()
Returns true if terminate() has been called on ctx.
|
ZMQ.Poller |
poller()
Create a new Poller within this context, with a default size.
|
ZMQ.Poller |
poller(int size)
Create a new Poller within this context, with a specified initial size.
|
Selector |
selector()
Create a new Selector within this context.
|
boolean |
setBlocky(boolean block) |
boolean |
setIOThreads(int ioThreads)
Set the size of the 0MQ thread pool to handle I/O operations.
|
boolean |
setIPv6(boolean ipv6) |
boolean |
setMaxSockets(int maxSockets)
Sets the maximum number of sockets allowed on the context
|
ZMQ.Socket |
socket(int type)
Deprecated.
|
ZMQ.Socket |
socket(SocketType type)
Creates a ØMQ socket within the specified context and return an opaque handle to the newly created socket.
|
void |
term()
This is an explicit "destructor".
|
protected Context(int ioThreads)
ioThreads - size of the threads pool to handle I/O operations.public boolean isTerminated()
public int getIOThreads()
public boolean setIOThreads(int ioThreads)
public int getMaxSockets()
public boolean setMaxSockets(int maxSockets)
@Deprecated public boolean getBlocky()
isBlocky() insteadpublic boolean isBlocky()
public boolean setBlocky(boolean block)
public boolean isIPv6()
public boolean getIPv6()
public boolean setIPv6(boolean ipv6)
public void term()
public boolean isClosed()
public ZMQ.Socket socket(SocketType type)
ZMQ.Socket.connect(String),
or at least one endpoint must be created for accepting incoming connections with ZMQ.Socket.bind(String).type - the socket type.@Deprecated public ZMQ.Socket socket(int type)
public Selector selector()
public boolean close(Selector selector)
selector - the Selector to close.public ZMQ.Poller poller()
ZMQ.Poller.close()public ZMQ.Poller poller(int size)
ZMQ.Poller.close()size - the poller initial size.public void close()
ZMQ.Socket.close(), any further operations on sockets
open within context shall fail with an error code of ETERM.ZMQ.Socket.close().ZMQ.Socket.send(java.lang.String) have either
been physically transferred to a network peer,
or the socket's linger period set with the ZMQ.Socket.setLinger(int) socket option has expired.
close in interface Closeableclose in interface AutoCloseableCopyright © 2020. All rights reserved.