public class ZContext extends Object implements Closeable
| Constructor and Description |
|---|
ZContext()
Class Constructor
|
ZContext(int ioThreads_) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ZMQ.Socket |
createSocket(int type)
Creates a new managed socket within this ZContext instance.
|
void |
destroy()
Destructor.
|
void |
destroySocket(ZMQ.Socket s)
Destroys managed socket within this context
and remove from sockets list
|
ZMQ.Context |
getContext() |
int |
getHWM() |
int |
getIoThreads() |
int |
getLinger() |
List<ZMQ.Socket> |
getSockets() |
boolean |
isMain() |
void |
setContext(ZMQ.Context ctx) |
void |
setHWM(int hwm) |
void |
setIoThreads(int ioThreads) |
void |
setLinger(int linger) |
void |
setMain(boolean main) |
static ZContext |
shadow(ZContext ctx)
Creates new shadow context.
|
public ZContext()
public ZContext(int ioThreads_)
public void destroy()
public ZMQ.Socket createSocket(int type)
type - socket type (see ZMQ static class members)public void destroySocket(ZMQ.Socket s)
s - org.zeromq.Socket object to destroypublic static ZContext shadow(ZContext ctx)
ctx - Original ZContext to create shadow ofpublic int getIoThreads()
public void setIoThreads(int ioThreads)
ioThreads - the ioThreads to setpublic int getLinger()
public void setLinger(int linger)
linger - the linger to setpublic int getHWM()
public void setHWM(int hwm)
hwm - the HWM to setpublic boolean isMain()
public void setMain(boolean main)
main - the main to setpublic ZMQ.Context getContext()
public void setContext(ZMQ.Context ctx)
ctx - sets the underlying org.zeromq.Context associated with this ZContext wrapper objectpublic List<ZMQ.Socket> getSockets()
public void close()
close in interface Closeableclose in interface AutoCloseableCopyright © 2014. All rights reserved.