public interface GridCommunicationClient
| Modifier and Type | Method and Description |
|---|---|
boolean |
async() |
boolean |
close() |
boolean |
closed() |
void |
doHandshake(GridInClosure2X<InputStream,OutputStream> handshakeC)
Executes the given handshake closure on opened client passing underlying IO streams.
|
void |
flushIfNeeded(long timeout) |
void |
forceClose()
Forces client close.
|
long |
getIdleTime()
Gets idle time of this client.
|
void |
release()
Releases this client by decreasing reservations.
|
boolean |
reserve() |
boolean |
reserved() |
void |
sendMessage(byte[] data,
int len) |
void |
sendMessage(ByteBuffer data) |
void |
sendMessage(UUID nodeId,
GridTcpCommunicationMessageAdapter msg) |
void doHandshake(GridInClosure2X<InputStream,OutputStream> handshakeC) throws GridException
handshakeC - Handshake.GridException - If handshake failed.boolean close()
True if client has been closed by this call,
false if failed to close client (due to concurrent reservation or concurrent close).void forceClose()
boolean closed()
True if client is closed;boolean reserve()
True if client was reserved, false otherwise.void release()
boolean reserved()
True if client was reserved.long getIdleTime()
void sendMessage(ByteBuffer data) throws GridException
data - Data to send.GridException - If failed.void sendMessage(byte[] data,
int len)
throws GridException
data - Data to send.len - Length.GridException - If failed.void sendMessage(@Nullable UUID nodeId, GridTcpCommunicationMessageAdapter msg) throws GridException
nodeId - Node ID (provided only if versions of local and remote nodes are different).msg - Message to send.GridException - If failed.void flushIfNeeded(long timeout)
throws IOException
timeout - Timeout.IOException - If failed.boolean async()
True if send is asynchronous.Copyright © 2014. All rights reserved.