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