public class ZeroMQNetChannel<IN,OUT> extends AbstractNetChannel<IN,OUT>
NetChannel.ConsumerSpec| Constructor and Description |
|---|
ZeroMQNetChannel(reactor.core.Environment env,
reactor.core.Reactor eventsReactor,
reactor.event.dispatch.Dispatcher ioDispatcher,
reactor.io.encoding.Codec<reactor.io.Buffer,IN,OUT> codec) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(reactor.function.Consumer<java.lang.Boolean> onClose)
Close this
NetChannel and invoke the given Consumer when closed. |
protected void |
flush()
Subclasses must implement this method to perform IO flushes.
|
NetChannel.ConsumerSpec |
on()
Assign event handlers to certain channel lifecycle events.
|
java.net.InetSocketAddress |
remoteAddress()
Get the address of the remote peer.
|
ZeroMQNetChannel<IN,OUT> |
setConnectionId(java.lang.String connectionId) |
ZeroMQNetChannel<IN,OUT> |
setSocket(org.zeromq.ZMQ.Socket socket) |
java.lang.String |
toString() |
protected void |
write(java.nio.ByteBuffer data,
reactor.core.composable.Deferred<java.lang.Void,reactor.core.composable.Promise<java.lang.Void>> onComplete,
boolean flush)
Subclasses must implement this method to perform the actual IO of writing data to the connection.
|
protected void |
write(java.lang.Object data,
reactor.core.composable.Deferred<java.lang.Void,reactor.core.composable.Promise<java.lang.Void>> onComplete,
boolean flush)
Subclasses must implement this method to perform the actual IO of writing data to the connection.
|
close, consume, getDecoder, getEncoder, getEnvironment, getEventsReactor, getIoReactor, in, notifyError, notifyRead, out, read, receive, send, send, send, sendAndForget, sendAndReceive, when, writepublic ZeroMQNetChannel<IN,OUT> setConnectionId(java.lang.String connectionId)
public ZeroMQNetChannel<IN,OUT> setSocket(org.zeromq.ZMQ.Socket socket)
public java.net.InetSocketAddress remoteAddress()
NetChannelprotected void write(java.nio.ByteBuffer data,
reactor.core.composable.Deferred<java.lang.Void,reactor.core.composable.Promise<java.lang.Void>> onComplete,
boolean flush)
AbstractNetChannelwrite in class AbstractNetChannel<IN,OUT>data - The data to write.onComplete - The callback to invoke when the write is complete.flush - whether to flush the underlying IO channelprotected void write(java.lang.Object data,
reactor.core.composable.Deferred<java.lang.Void,reactor.core.composable.Promise<java.lang.Void>> onComplete,
boolean flush)
AbstractNetChannelwrite in class AbstractNetChannel<IN,OUT>data - The data to write.onComplete - The callback to invoke when the write is complete.flush - whether to flush the underlying IO channelprotected void flush()
AbstractNetChannelflush in class AbstractNetChannel<IN,OUT>public void close(reactor.function.Consumer<java.lang.Boolean> onClose)
NetChannelNetChannel and invoke the given Consumer when closed.public NetChannel.ConsumerSpec on()
NetChannelpublic java.lang.String toString()
toString in class java.lang.Object