org.zeromq
类 ZMQ.Context

java.lang.Object
  继承者 org.zeromq.ZMQ.Context
所有已实现的接口:
java.io.Closeable
包容类:
ZMQ

public static class ZMQ.Context
extends java.lang.Object
implements java.io.Closeable

Inner class: Context.


构造方法摘要
protected ZMQ.Context(int ioThreads)
          Class constructor.
 
方法摘要
 void close()
           
protected  void construct(int ioThreads)
          Initialize the JNI interface
protected  void destroy()
          Free all resources used by JNI interface.
 int getMaxSockets()
          The maximum number of sockets allowed on the context
 ZMQ.Poller poller()
          已过时。 use Poller constructor
 ZMQ.Poller poller(int size)
          已过时。 use Poller constructor
 boolean setMaxSockets(int maxSockets)
          Sets the maximum number of sockets allowed on the context
 ZMQ.Socket socket(int type)
          Create a new Socket within this context.
 void term()
          This is an explicit "destructor".
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

ZMQ.Context

protected ZMQ.Context(int ioThreads)
Class constructor.

参数:
ioThreads - size of the threads pool to handle I/O operations.
方法详细信息

term

public void term()
This is an explicit "destructor". It can be called to ensure the corresponding 0MQ Context has been disposed of.


socket

public ZMQ.Socket socket(int type)
Create a new Socket within this context.

参数:
type - the socket type.
返回:
the newly created Socket.

poller

public ZMQ.Poller poller()
已过时。 use Poller constructor

Create a new Poller within this context, with a default size.

返回:
the newly created Poller.

poller

public ZMQ.Poller poller(int size)
已过时。 use Poller constructor

Create a new Poller within this context, with a specified initial size.

参数:
size - the poller initial size.
返回:
the newly created Poller.

construct

protected void construct(int ioThreads)
Initialize the JNI interface


destroy

protected void destroy()
Free all resources used by JNI interface.


close

public void close()
指定者:
接口 java.io.Closeable 中的 close

setMaxSockets

public boolean setMaxSockets(int maxSockets)
Sets the maximum number of sockets allowed on the context


getMaxSockets

public int getMaxSockets()
The maximum number of sockets allowed on the context