Top Description Methods
org.springframework.messaging.tcp

public Interface TcpOperations<P>

Known Direct Implementers
org.springframework.messaging.tcp.reactor.ReactorNetty2TcpClient, org.springframework.messaging.tcp.reactor.ReactorNettyTcpClient
Type Parameters
<P>
the type of payload for inbound and outbound messages
Imports
java.util.concurrent.CompletableFuture

A contract for establishing TCP connections.
Author
Rossen Stoyanchev
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public default ListenableFuture<Void>

Returns:

a ListenableFuture that can be used to determine when and if the connection is successfully established
connect
(TcpConnectionHandler<P>
a handler to manage the connection
connectionHandler
)

Deprecated since 6.0. as of 6.0, in favor of connectAsync(TcpConnectionHandler)
Open a new connection.
public default ListenableFuture<Void>

Returns:

a ListenableFuture that can be used to determine when and if the initial connection is successfully established
connect
(TcpConnectionHandler<P>
a handler to manage the connection
connectionHandler
,
ReconnectStrategy
a strategy for reconnecting
reconnectStrategy
)

Deprecated since 6.0. as of 6.0, in favor of connectAsync(TcpConnectionHandler, ReconnectStrategy)
Open a new connection and a strategy for reconnecting if the connection fails.
public CompletableFuture<Void>

Returns:

a CompletableFuture that can be used to determine when and if the connection is successfully established
connectAsync
(TcpConnectionHandler<P>
a handler to manage the connection
connectionHandler
)

Open a new connection.

public CompletableFuture<Void>

Returns:

a CompletableFuture that can be used to determine when and if the initial connection is successfully established
connectAsync
(TcpConnectionHandler<P>
a handler to manage the connection
connectionHandler
,
ReconnectStrategy
a strategy for reconnecting
reconnectStrategy
)

Open a new connection and a strategy for reconnecting if the connection fails.

public default ListenableFuture<Void>

Returns:

a ListenableFuture that can be used to determine when and if the connection is successfully closed
shutdown
()

Deprecated since 6.0. as of 6.0, in favor of shutdownAsync()
Shut down and close any open connections.
public CompletableFuture<Void>

Returns:

a CompletableFuture that can be used to determine when and if the connection is successfully closed
shutdownAsync
()

Shut down and close any open connections.

Method Detail

connectback to summary
public default ListenableFuture<Void> connect(TcpConnectionHandler<P> connectionHandler)

Deprecated

since 6.0.

as of 6.0, in favor of connectAsync(TcpConnectionHandler)

Open a new connection.

Parameters
connectionHandler:TcpConnectionHandler<P>

a handler to manage the connection

Returns:ListenableFuture<Void>

a ListenableFuture that can be used to determine when and if the connection is successfully established

Annotations
@Deprecated
since:6.0
connectback to summary
public default ListenableFuture<Void> connect(TcpConnectionHandler<P> connectionHandler, ReconnectStrategy reconnectStrategy)

Deprecated

since 6.0.

as of 6.0, in favor of connectAsync(TcpConnectionHandler, ReconnectStrategy)

Open a new connection and a strategy for reconnecting if the connection fails.

Parameters
connectionHandler:TcpConnectionHandler<P>

a handler to manage the connection

reconnectStrategy:ReconnectStrategy

a strategy for reconnecting

Returns:ListenableFuture<Void>

a ListenableFuture that can be used to determine when and if the initial connection is successfully established

Annotations
@Deprecated
since:6.0
connectAsyncback to summary
public CompletableFuture<Void> connectAsync(TcpConnectionHandler<P> connectionHandler)

Open a new connection.

Parameters
connectionHandler:TcpConnectionHandler<P>

a handler to manage the connection

Returns:CompletableFuture<Void>

a CompletableFuture that can be used to determine when and if the connection is successfully established

Since
6.0
connectAsyncback to summary
public CompletableFuture<Void> connectAsync(TcpConnectionHandler<P> connectionHandler, ReconnectStrategy reconnectStrategy)

Open a new connection and a strategy for reconnecting if the connection fails.

Parameters
connectionHandler:TcpConnectionHandler<P>

a handler to manage the connection

reconnectStrategy:ReconnectStrategy

a strategy for reconnecting

Returns:CompletableFuture<Void>

a CompletableFuture that can be used to determine when and if the initial connection is successfully established

Since
6.0
shutdownback to summary
public default ListenableFuture<Void> shutdown()

Deprecated

since 6.0.

as of 6.0, in favor of shutdownAsync()

Shut down and close any open connections.

Returns:ListenableFuture<Void>

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

Annotations
@Deprecated
since:6.0
shutdownAsyncback to summary
public CompletableFuture<Void> shutdownAsync()

Shut down and close any open connections.

Returns:CompletableFuture<Void>

a CompletableFuture that can be used to determine when and if the connection is successfully closed

Since
6.0