org.zeromq
类 ZDispatcher
java.lang.Object
org.zeromq.ZDispatcher
public class ZDispatcher
- extends java.lang.Object
Dispatcher for ZeroMQ Sockets.
Warning:
The Dispatcher uses a busy spin loop when waiting on events.
This is ideal for low latency applications but not in all situations.
It has the side effect of consuming 100% of a CPU when waiting for events.
With this dispatcher, you can register ONE handler per socket
and get a Sender for sending ZMsg.
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZDispatcher
public ZDispatcher()
ZDispatcher
public ZDispatcher(java.util.concurrent.ExecutorService dispatcherExecutor)
registerHandler
public void registerHandler(ZMQ.Socket socket,
ZDispatcher.ZMessageHandler messageHandler,
ZDispatcher.ZSender sender)
registerHandler
public void registerHandler(ZMQ.Socket socket,
ZDispatcher.ZMessageHandler messageHandler,
ZDispatcher.ZSender sender,
java.util.concurrent.ExecutorService threadpool)
unregisterHandler
public void unregisterHandler(ZMQ.Socket socket)
shutdown
public void shutdown()