Class FixedIntervalReconnectStrategy
java.lang.Object
org.springframework.messaging.tcp.FixedIntervalReconnectStrategy
- All Implemented Interfaces:
- ReconnectStrategy
A simple strategy for making reconnect attempts at a fixed interval.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructorsConstructorDescriptionFixedIntervalReconnectStrategy(long interval) Create a newFixedIntervalReconnectStrategyinstance.
- 
Method SummaryModifier and TypeMethodDescriptiongetTimeToNextAttempt(int attemptCount) Return the time to the next attempt to reconnect.
- 
Constructor Details- 
FixedIntervalReconnectStrategypublic FixedIntervalReconnectStrategy(long interval) Create a newFixedIntervalReconnectStrategyinstance.- Parameters:
- interval- the frequency, in millisecond, at which to try to reconnect
 
 
- 
- 
Method Details- 
getTimeToNextAttemptDescription copied from interface:ReconnectStrategyReturn the time to the next attempt to reconnect.- Specified by:
- getTimeToNextAttemptin interface- ReconnectStrategy
- Parameters:
- attemptCount- how many reconnect attempts have been made already
- Returns:
- the amount of time in milliseconds, or nullto stop
 
 
-