@ThreadSafe interface InternalConnection extends BufferProvider
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the connection.
|
ConnectionDescription |
getDescription()
Gets the description of this connection.
|
boolean |
isClosed()
Returns the closed state of the connection
|
void |
open()
Opens the connection so its ready for use
|
void |
openAsync(SingleResultCallback<java.lang.Void> callback)
Opens the connection so its ready for use
|
boolean |
opened()
Returns if the connection has been opened
|
ResponseBuffers |
receiveMessage(int responseTo)
Receive a response to a sent message from the server.
|
void |
receiveMessageAsync(int responseTo,
SingleResultCallback<ResponseBuffers> callback)
Asynchronously receive a response to a sent message from the server.
|
void |
sendMessage(java.util.List<ByteBuf> byteBuffers,
int lastRequestId)
Send a message to the server.
|
void |
sendMessageAsync(java.util.List<ByteBuf> byteBuffers,
int lastRequestId,
SingleResultCallback<java.lang.Void> callback)
Asynchronously send a message to the server.
|
getBufferConnectionDescription getDescription()
void open()
void openAsync(SingleResultCallback<java.lang.Void> callback)
callback - the callback to be called once the connection has been openedvoid close()
boolean opened()
boolean isClosed()
void sendMessage(java.util.List<ByteBuf> byteBuffers, int lastRequestId)
byteBuffers - the list of byte buffers to send.lastRequestId - the request id of the last message in byteBuffersResponseBuffers receiveMessage(int responseTo)
responseTo - the request id that this message is a response tovoid sendMessageAsync(java.util.List<ByteBuf> byteBuffers, int lastRequestId, SingleResultCallback<java.lang.Void> callback)
byteBuffers - the list of byte buffers to sendlastRequestId - the request id of the last message in byteBufferscallback - the callback to invoke on completionvoid receiveMessageAsync(int responseTo,
SingleResultCallback<ResponseBuffers> callback)
responseTo - the request id that this message is a response tocallback - the callback to invoke on completion