Class ReconnectConfiguration

java.lang.Object
com.vaadin.client.communication.ReconnectConfiguration

public class ReconnectConfiguration extends Object
Tracks the reconnect configuration stored in the root node and provides it with an easier to use API.

Also triggers ConnectionStateHandler.configurationUpdated() whenever part of the configuration changes.

Since:
1.0
Author:
Vaadin Ltd
  • Constructor Details

    • ReconnectConfiguration

      public ReconnectConfiguration(Registry registry)
      Creates a new instance using the given registry.
      Parameters:
      registry - the registry
  • Method Details

    • bind

      public static void bind(ConnectionStateHandler connectionStateHandler)
      Binds this ReconnectDialogConfiguration to the given ConnectionStateHandler so that ConnectionStateHandler.configurationUpdated() is run whenever a relevant part of ReconnectConfiguration changes.
      Parameters:
      connectionStateHandler - the connection state handler to bind to
    • getDialogText

      @Deprecated public String getDialogText()
      Deprecated.
      The API for configuring the connection indicator has changed.
      Gets the text to show in the reconnect dialog.
      Returns:
      the text to show in the reconnect dialog.
    • getDialogTextGaveUp

      @Deprecated public String getDialogTextGaveUp()
      Deprecated.
      The API for configuring the connection indicator has changed.
      Gets the text to show in the reconnect dialog when no longer trying to reconnect.
      Returns:
      the text to show in the reconnect dialog when no longer trying to reconnect
    • getReconnectAttempts

      public int getReconnectAttempts()
      Gets the number of reconnect attempts that should be performed before giving up.
      Returns:
      the number of reconnect attempts to perform
    • getReconnectInterval

      public int getReconnectInterval()
      Gets the interval in milliseconds to wait between reconnect attempts.
      Returns:
      the interval in milliseconds to wait between reconnect attempts