Package com.vaadin.client.communication
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 Summary
Constructors Constructor Description ReconnectConfiguration(Registry registry)
Creates a new instance using the given registry.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static void
bind(ConnectionStateHandler connectionStateHandler)
Binds this ReconnectDialogConfiguration to the givenConnectionStateHandler
so thatConnectionStateHandler.configurationUpdated()
is run whenever a relevant part ofReconnectConfiguration
changes.String
getDialogText()
Deprecated.The API for configuring the connection indicator has changed.String
getDialogTextGaveUp()
Deprecated.The API for configuring the connection indicator has changed.int
getReconnectAttempts()
Gets the number of reconnect attempts that should be performed before giving up.int
getReconnectInterval()
Gets the interval in milliseconds to wait between reconnect attempts.
-
-
-
Constructor Detail
-
ReconnectConfiguration
public ReconnectConfiguration(Registry registry)
Creates a new instance using the given registry.- Parameters:
registry
- the registry
-
-
Method Detail
-
bind
public static void bind(ConnectionStateHandler connectionStateHandler)
Binds this ReconnectDialogConfiguration to the givenConnectionStateHandler
so thatConnectionStateHandler.configurationUpdated()
is run whenever a relevant part ofReconnectConfiguration
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
-
-