Interface TcpOperations<P>
- Type Parameters:
- P- the type of payload for inbound and outbound messages
- All Known Implementing Classes:
- ReactorNettyTcpClient
public interface TcpOperations<P>
A contract for establishing TCP connections.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev
- 
Method SummaryModifier and TypeMethodDescriptionconnectAsync(TcpConnectionHandler<P> connectionHandler) Open a new connection.connectAsync(TcpConnectionHandler<P> connectionHandler, ReconnectStrategy reconnectStrategy) Open a new connection and a strategy for reconnecting if the connection fails.Shut down and close any open connections.
- 
Method Details- 
connectAsyncOpen a new connection.- Parameters:
- connectionHandler- a handler to manage the connection
- Returns:
- a CompletableFuture that can be used to determine when and if the connection is successfully established
- Since:
- 6.0
 
- 
connectAsyncCompletableFuture<Void> connectAsync(TcpConnectionHandler<P> connectionHandler, ReconnectStrategy reconnectStrategy) Open a new connection and a strategy for reconnecting if the connection fails.- Parameters:
- connectionHandler- a handler to manage the connection
- reconnectStrategy- a strategy for reconnecting
- Returns:
- a CompletableFuture that can be used to determine when and if the initial connection is successfully established
- Since:
- 6.0
 
- 
shutdownAsyncCompletableFuture<Void> shutdownAsync()Shut down and close any open connections.- Returns:
- a CompletableFuture that can be used to determine when and if the connection is successfully closed
- Since:
- 6.0
 
 
-