Top Description Fields Constructors Methods
org.springframework.messaging.tcp

public Class FixedIntervalReconnectStrategy

extends Object
implements ReconnectStrategy
Class Inheritance
All Implemented Interfaces
org.springframework.messaging.tcp.ReconnectStrategy

A simple strategy for making reconnect attempts at a fixed interval.
Author
Rossen Stoyanchev
Since
4.0

Field Summary

Modifier and TypeField and Description
private final long

Constructor Summary

AccessConstructor and Description
public
FixedIntervalReconnectStrategy(long
the frequency, in millisecond, at which to try to reconnect
interval
)

Create a new FixedIntervalReconnectStrategy instance.

Method Summary

Modifier and TypeMethod and Description
public Long
getTimeToNextAttempt(int
how many reconnect attempts have been made already
attemptCount
)

Implements org.springframework.messaging.tcp.ReconnectStrategy.getTimeToNextAttempt.

Return the time to the next attempt to reconnect.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

intervalback to summary
private final long interval

Constructor Detail

FixedIntervalReconnectStrategyback to summary
public FixedIntervalReconnectStrategy(long interval)

Create a new FixedIntervalReconnectStrategy instance.

Parameters
interval:long

the frequency, in millisecond, at which to try to reconnect

Method Detail

getTimeToNextAttemptback to summary
public Long getTimeToNextAttempt(int attemptCount)

Implements org.springframework.messaging.tcp.ReconnectStrategy.getTimeToNextAttempt.

Doc from org.springframework.messaging.tcp.ReconnectStrategy.getTimeToNextAttempt.

Return the time to the next attempt to reconnect.

Parameters
attemptCount:int

how many reconnect attempts have been made already

Returns:Long

the amount of time in milliseconds, or null to stop

Annotations
@Override