Package com.vaadin.client.communication
Class ReconnectConfiguration
java.lang.Object
com.vaadin.client.communication.ReconnectConfiguration
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
ConstructorsConstructorDescriptionReconnectConfiguration(Registry registry) Creates a new instance using the given registry. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidbind(ConnectionStateHandler connectionStateHandler) Binds this ReconnectDialogConfiguration to the givenConnectionStateHandlerso thatConnectionStateHandler.configurationUpdated()is run whenever a relevant part ofReconnectConfigurationchanges.Deprecated.The API for configuring the connection indicator has changed.Deprecated.The API for configuring the connection indicator has changed.intGets the number of reconnect attempts that should be performed before giving up.intGets the interval in milliseconds to wait between reconnect attempts.
-
Constructor Details
-
ReconnectConfiguration
Creates a new instance using the given registry.- Parameters:
registry- the registry
-
-
Method Details
-
bind
Binds this ReconnectDialogConfiguration to the givenConnectionStateHandlerso thatConnectionStateHandler.configurationUpdated()is run whenever a relevant part ofReconnectConfigurationchanges.- Parameters:
connectionStateHandler- the connection state handler to bind to
-
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.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
-