public interface Transport
Modifier and Type | Method and Description |
---|---|
io.netty.buffer.ByteBuf |
allocateSendBuffer(int size)
Request that the Transport provide an output buffer sized for the given
value.
|
void |
close()
Close the Transport, no additional send operations are accepted.
|
void |
connect()
Performs the protocol connect operation for the implemented Transport type
such as a TCP socket connection etc.
|
URI |
getRemoteLocation() |
TransportListener |
getTransportListener()
Gets the currently set TransportListener instance
|
TransportOptions |
getTransportOptions() |
boolean |
isConnected() |
void |
send(io.netty.buffer.ByteBuf output)
Sends a chunk of data over the Transport connection.
|
void |
setTransportListener(TransportListener listener)
Sets the Transport Listener instance that will be notified of incoming data or
error events.
|
void connect() throws IOException
IOException
- if an error occurs while attempting the connect.boolean isConnected()
void close() throws IOException
IOException
- if an error occurs while closing the connection.io.netty.buffer.ByteBuf allocateSendBuffer(int size) throws IOException
size
- the size necessary to hold the outgoing bytes.IOException
- if an error occurs while allocating the send buffer.void send(io.netty.buffer.ByteBuf output) throws IOException
output
- The buffer of data that is to be transmitted.IOException
- if an error occurs during the send operation.TransportListener getTransportListener()
void setTransportListener(TransportListener listener)
listener
- The new TransportListener instance to use (cannot be null).IllegalArgumentException
- if the given listener is null.TransportOptions getTransportOptions()
URI getRemoteLocation()
Copyright © 2013–2016 The Apache Software Foundation. All rights reserved.