org.springframework.messaging.tcp

## Class FixedIntervalReconnectStrategy

- java.lang.Object
- - org.springframework.messaging.tcp.FixedIntervalReconnectStrategy

- All Implemented Interfaces:
    ReconnectStrategy

      public class FixedIntervalReconnectStrategy
      extends Object
      implements ReconnectStrategy

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FixedIntervalReconnectStrategy(long interval)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Long` | `getTimeToNextAttempt(int attemptCount)` Return the time to the next attempt to reconnect.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FixedIntervalReconnectStrategy

          public FixedIntervalReconnectStrategy(long interval)

      Parameters:
        `interval` - the frequency, in millisecond, at which to try to reconnect

  - ### Method Detail

    - #### getTimeToNextAttempt

          public Long getTimeToNextAttempt(int attemptCount)

      Description copied from interface: `ReconnectStrategy`
      Return the time to the next attempt to reconnect.
      Specified by:
        `getTimeToNextAttempt` in interface `ReconnectStrategy`
      Parameters:
        `attemptCount` - how many reconnect attempts have been made already
      Returns:
        the amount of time in milliseconds or `null` to stop