public interface Transport
| Modifier and Type | Method and Description |
|---|---|
void |
drainInbound() |
void |
flush()
Forces a flush of any output buffers.
|
boolean |
full() |
java.util.concurrent.Executor |
getBlockingExecutor() |
DispatchQueue |
getDispatchQueue()
Returns the dispatch queue used by the transport
|
java.net.SocketAddress |
getLocalAddress() |
ProtocolCodec |
getProtocolCodec() |
java.nio.channels.ReadableByteChannel |
getReadChannel() |
java.net.SocketAddress |
getRemoteAddress() |
TransportListener |
getTransportListener()
Returns the current transport listener
|
java.nio.channels.WritableByteChannel |
getWriteChannel() |
boolean |
isClosed() |
boolean |
isConnected() |
boolean |
offer(java.lang.Object command)
A one way asynchronous send of a command.
|
void |
resumeRead()
resume delivery of commands.
|
void |
setBlockingExecutor(java.util.concurrent.Executor blockingExecutor) |
void |
setDispatchQueue(DispatchQueue queue)
Sets the dispatch queue used by the transport
|
void |
setProtocolCodec(ProtocolCodec protocolCodec)
Sets the protocol codec for the transport
|
void |
setTransportListener(TransportListener transportListener)
Registers an inbound command listener
|
void |
start(java.lang.Runnable onComplete)
Starts the service.
|
void |
start(Task onComplete)
Starts the service.
|
void |
stop(java.lang.Runnable onComplete)
Stops the service.
|
void |
stop(Task onComplete)
Stops the service.
|
void |
suspendRead()
suspend delivery of commands.
|
void start(java.lang.Runnable onComplete)
onComplete - my be set to null if not interested in a callback.void stop(java.lang.Runnable onComplete)
onComplete - my be set to null if not interested in a callback.void start(Task onComplete)
onComplete - my be set to null if not interested in a callback.void stop(Task onComplete)
onComplete - my be set to null if not interested in a callback.boolean full()
boolean offer(java.lang.Object command)
command - void flush()
TransportListener getTransportListener()
void setTransportListener(TransportListener transportListener)
transportListener - DispatchQueue getDispatchQueue()
void setDispatchQueue(DispatchQueue queue)
queue - void suspendRead()
void resumeRead()
java.net.SocketAddress getRemoteAddress()
java.net.SocketAddress getLocalAddress()
void drainInbound()
boolean isClosed()
boolean isConnected()
ProtocolCodec getProtocolCodec()
void setProtocolCodec(ProtocolCodec protocolCodec) throws java.lang.Exception
protocolCodec - java.lang.Exceptionjava.util.concurrent.Executor getBlockingExecutor()
void setBlockingExecutor(java.util.concurrent.Executor blockingExecutor)
java.nio.channels.ReadableByteChannel getReadChannel()
java.nio.channels.WritableByteChannel getWriteChannel()