public interface Transport
Modifier and Type | Method and Description |
---|---|
void |
drainInbound() |
void |
flush()
Forces a flush of any output buffers.
|
boolean |
full() |
Executor |
getBlockingExecutor() |
DispatchQueue |
getDispatchQueue()
Returns the dispatch queue used by the transport
|
SocketAddress |
getLocalAddress() |
ProtocolCodec |
getProtocolCodec() |
ReadableByteChannel |
getReadChannel() |
SocketAddress |
getRemoteAddress() |
TransportListener |
getTransportListener()
Returns the current transport listener
|
WritableByteChannel |
getWriteChannel() |
boolean |
isClosed() |
boolean |
isConnected() |
boolean |
offer(Object command)
A one way asynchronous send of a command.
|
void |
resumeRead()
resume delivery of commands.
|
void |
setBlockingExecutor(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(Runnable onComplete)
Starts the service.
|
void |
start(Task onComplete)
Starts the service.
|
void |
stop(Runnable onComplete)
Stops the service.
|
void |
stop(Task onComplete)
Stops the service.
|
void |
suspendRead()
suspend delivery of commands.
|
void start(Runnable onComplete)
onComplete
- my be set to null if not interested in a callback.void stop(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(Object command)
command
- void flush()
TransportListener getTransportListener()
void setTransportListener(TransportListener transportListener)
transportListener
- DispatchQueue getDispatchQueue()
void setDispatchQueue(DispatchQueue queue)
queue
- void suspendRead()
void resumeRead()
SocketAddress getRemoteAddress()
SocketAddress getLocalAddress()
void drainInbound()
boolean isClosed()
boolean isConnected()
ProtocolCodec getProtocolCodec()
void setProtocolCodec(ProtocolCodec protocolCodec) throws Exception
protocolCodec
- Exception
Executor getBlockingExecutor()
void setBlockingExecutor(Executor blockingExecutor)
ReadableByteChannel getReadChannel()
WritableByteChannel getWriteChannel()
Copyright © 2010–2017 FuseSource, Corp.. All rights reserved.