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(SSLContext sslContextOverride)
Performs the connect operation for the implemented Transport type
such as a TCP socket connection, SSL/TLS handshake etc.
|
Principal |
getLocalPrincipal() |
int |
getMaxFrameSize()
Returns the currently configured maximum frame size setting.
|
URI |
getRemoteLocation() |
TransportListener |
getTransportListener()
Gets the currently set TransportListener instance
|
TransportOptions |
getTransportOptions() |
boolean |
isConnected() |
boolean |
isSecure() |
void |
send(io.netty.buffer.ByteBuf output)
Sends a chunk of data over the Transport connection.
|
void |
setMaxFrameSize(int maxFrameSize)
Sets the Maximum Frame Size the transport should accept from the remote.
|
void |
setTransportListener(TransportListener listener)
Sets the Transport Listener instance that will be notified of incoming data or
error events.
|
void connect(SSLContext sslContextOverride) throws IOException
sslContextOverride - a user-provided SSLContext to use if establishing a secure
connection, overrides applicable URI configurationIOException - if an error occurs while attempting the connect.boolean isConnected()
boolean isSecure()
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()
Principal getLocalPrincipal()
void setMaxFrameSize(int maxFrameSize)
maxFrameSize - The maximum frame size to accept from the remote.int getMaxFrameSize()
Copyright © 2013–2018 The Apache Software Foundation. All rights reserved.