org.springframework.messaging.tcp

## Interface TcpOperations<P>

Type Parameters:
  `P` - the type of payload for in 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 Summary

All Methods Instance Methods Abstract Methods
`org.springframework.util.concurrent.ListenableFuture<Void>` `connect(TcpConnectionHandler<P> connectionHandler)` Open a new connection.
`org.springframework.util.concurrent.ListenableFuture<Void>` `connect(TcpConnectionHandler<P> connectionHandler, ReconnectStrategy reconnectStrategy)` Open a new connection and a strategy for reconnecting if the connection fails.
`org.springframework.util.concurrent.ListenableFuture<Void>` `shutdown()` Shut down and close any open connections.

### Method Detail

#### connect

    org.springframework.util.concurrent.ListenableFuture<Void> connect(TcpConnectionHandler<P> connectionHandler)

Open a new connection.

Parameters:
  `connectionHandler` - a handler to manage the connection
Returns:
  a ListenableFuture that can be used to determine when and if the connection is successfully established

#### connect

    org.springframework.util.concurrent.ListenableFuture<Void> connect(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 ListenableFuture that can be used to determine when and if the initial connection is successfully established

#### shutdown

    org.springframework.util.concurrent.ListenableFuture<Void> shutdown()

Shut down and close any open connections.

Returns:
  a ListenableFuture that can be used to determine when and if the connection is successfully closed