P
- the type of payload for in and outbound messagespublic interface TcpOperations<P>
Modifier and Type | Method and Description |
---|---|
ListenableFuture<Void> |
connect(TcpConnectionHandler<P> connectionHandler)
Open a new connection.
|
ListenableFuture<Void> |
connect(TcpConnectionHandler<P> connectionHandler,
ReconnectStrategy reconnectStrategy)
Open a new connection and a strategy for reconnecting if the connection fails.
|
ListenableFuture<Boolean> |
shutdown()
Shut down and close any open connections.
|
ListenableFuture<Void> connect(TcpConnectionHandler<P> connectionHandler)
connectionHandler
- a handler to manage the connectionListenableFuture<Void> connect(TcpConnectionHandler<P> connectionHandler, ReconnectStrategy reconnectStrategy)
connectionHandler
- a handler to manage the connectionreconnectStrategy
- a strategy for reconnectingListenableFuture<Boolean> shutdown()