Interface ClientConnection
-
- All Superinterfaces:
AutoCloseable
public interface ClientConnection extends AutoCloseable
Client connection: abstracts away sending and receiving messages.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Closes the connection.@Nullable InetSocketAddresslocalAddress()Gets local address of this session.@Nullable InetSocketAddressremoteAddress()Gets address of remote peer on this session.voidsend(ByteBuffer msg, @Nullable Runnable onDone)Sends a message.
-
-
-
Method Detail
-
send
void send(ByteBuffer msg, @Nullable @Nullable Runnable onDone) throws IgniteCheckedException
Sends a message.- Parameters:
msg- Message buffer.onDone- Callback to be invoked when asynchronous send operation completes.- Throws:
IgniteCheckedException
-
localAddress
@Nullable @Nullable InetSocketAddress localAddress()
Gets local address of this session.- Returns:
- Local network address or
nullif non-socket communication is used.
-
remoteAddress
@Nullable @Nullable InetSocketAddress remoteAddress()
Gets address of remote peer on this session.- Returns:
- Address of remote peer or
nullif non-socket communication is used.
-
close
void close()
Closes the connection.- Specified by:
closein interfaceAutoCloseable
-
-