接口的使用
org.springframework.messaging.tcp.ReconnectStrategy
使用ReconnectStrategy的程序包 程序包 说明 org.springframework.messaging.tcp Contains abstractions and implementation classes for establishing TCP connections viaTcpOperations
, handling messages viaTcpConnectionHandler
, as well as sending messages viaTcpConnection
.org.springframework.messaging.tcp.reactor Contains support for TCP messaging based on Reactor.org.springframework.messaging.tcp中ReconnectStrategy的使用
实现ReconnectStrategy的org.springframework.messaging.tcp中的类 修饰符和类型 类 说明 class
FixedIntervalReconnectStrategy
A simple strategy for making reconnect attempts at a fixed interval.参数类型为ReconnectStrategy的org.springframework.messaging.tcp中的方法 修饰符和类型 方法 说明 ListenableFuture<Void>
TcpOperations. connect(TcpConnectionHandler<P> connectionHandler, ReconnectStrategy reconnectStrategy)
Open a new connection and a strategy for reconnecting if the connection fails.org.springframework.messaging.tcp.reactor中ReconnectStrategy的使用
参数类型为ReconnectStrategy的org.springframework.messaging.tcp.reactor中的方法 修饰符和类型 方法 说明 ListenableFuture<Void>
ReactorNettyTcpClient. connect(TcpConnectionHandler<P> handler, ReconnectStrategy strategy)