Class ReconnectDialogConfigurationMap
java.lang.Object
com.vaadin.flow.internal.nodefeature.NodeFeature
com.vaadin.flow.internal.nodefeature.NodeMap
com.vaadin.flow.internal.nodefeature.ReconnectDialogConfigurationMap
- All Implemented Interfaces:
ReconnectDialogConfiguration
,Serializable
public class ReconnectDialogConfigurationMap
extends NodeMap
implements ReconnectDialogConfiguration
Map for storing the reconnect dialog configuration for a UI.
For internal use only. May be renamed or removed in a future release.
- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCreates a new map for the given node. -
Method Summary
Modifier and TypeMethodDescriptionGets the text to show in the reconnect dialog when trying to re-establish the server connection.Gets the text to show in the reconnect dialog after giving up trying to reconnect (ReconnectDialogConfiguration.getReconnectAttempts()
reached).int
Gets the number of times to try to reconnect to the server before giving up.int
Gets the interval (in milliseconds) between reconnect attempts.void
setDialogText
(String dialogText) Sets the text to show in the reconnect dialog when trying to re-establish the server connection.void
setDialogTextGaveUp
(String dialogTextGaveUp) Sets the text to show in the reconnect dialog after giving up trying to reconnect (ReconnectDialogConfiguration.getReconnectAttempts()
reached).void
setReconnectAttempts
(int reconnectAttempts) Sets the number of times to try to reconnect to the server before giving up.void
setReconnectInterval
(int reconnectInterval) Sets the interval (in milliseconds) between reconnect attempts.Methods inherited from class com.vaadin.flow.internal.nodefeature.NodeMap
clear, collectChanges, contains, forEachChild, generateChangesFromEmpty, get, getOrDefault, getOrDefault, getOrDefault, keySet, mayUpdateFromClient, producePutChange, put, put, remove, updateFromClient
Methods inherited from class com.vaadin.flow.internal.nodefeature.NodeFeature
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
-
Field Details
-
DIALOG_TEXT_KEY
- See Also:
-
DIALOG_TEXT_DEFAULT
- See Also:
-
DIALOG_TEXT_GAVE_UP_KEY
- See Also:
-
DIALOG_TEXT_GAVE_UP_DEFAULT
- See Also:
-
RECONNECT_ATTEMPTS_KEY
- See Also:
-
RECONNECT_ATTEMPTS_DEFAULT
public static final int RECONNECT_ATTEMPTS_DEFAULT- See Also:
-
RECONNECT_INTERVAL_KEY
- See Also:
-
RECONNECT_INTERVAL_DEFAULT
public static final int RECONNECT_INTERVAL_DEFAULT- See Also:
-
-
Constructor Details
-
ReconnectDialogConfigurationMap
Creates a new map for the given node.- Parameters:
node
- the node that the map belongs to
-
-
Method Details
-
getDialogText
Description copied from interface:ReconnectDialogConfiguration
Gets the text to show in the reconnect dialog when trying to re-establish the server connection.The default is "Connection lost, trying to reconnect..."
- Specified by:
getDialogText
in interfaceReconnectDialogConfiguration
- Returns:
- the text to show in the reconnect dialog
-
setDialogText
Description copied from interface:ReconnectDialogConfiguration
Sets the text to show in the reconnect dialog when trying to re-establish the server connection.- Specified by:
setDialogText
in interfaceReconnectDialogConfiguration
- Parameters:
dialogText
- the text to show in the reconnect dialog
-
getDialogTextGaveUp
Description copied from interface:ReconnectDialogConfiguration
Gets the text to show in the reconnect dialog after giving up trying to reconnect (ReconnectDialogConfiguration.getReconnectAttempts()
reached).The default is "Connection lost"
- Specified by:
getDialogTextGaveUp
in interfaceReconnectDialogConfiguration
- Returns:
- the text to show in the reconnect dialog after giving up
-
setDialogTextGaveUp
Description copied from interface:ReconnectDialogConfiguration
Sets the text to show in the reconnect dialog after giving up trying to reconnect (ReconnectDialogConfiguration.getReconnectAttempts()
reached).- Specified by:
setDialogTextGaveUp
in interfaceReconnectDialogConfiguration
- Parameters:
dialogTextGaveUp
- the text to show in the reconnect dialog after giving up
-
getReconnectAttempts
public int getReconnectAttempts()Description copied from interface:ReconnectDialogConfiguration
Gets the number of times to try to reconnect to the server before giving up.The default is 10000
- Specified by:
getReconnectAttempts
in interfaceReconnectDialogConfiguration
- Returns:
- the number of times to try to reconnect
-
setReconnectAttempts
public void setReconnectAttempts(int reconnectAttempts) Description copied from interface:ReconnectDialogConfiguration
Sets the number of times to try to reconnect to the server before giving up.- Specified by:
setReconnectAttempts
in interfaceReconnectDialogConfiguration
- Parameters:
reconnectAttempts
- the number of times to try to reconnect
-
getReconnectInterval
public int getReconnectInterval()Description copied from interface:ReconnectDialogConfiguration
Gets the interval (in milliseconds) between reconnect attempts.The default is 5000
- Specified by:
getReconnectInterval
in interfaceReconnectDialogConfiguration
- Returns:
- the interval (in ms) between reconnect attempts
-
setReconnectInterval
public void setReconnectInterval(int reconnectInterval) Description copied from interface:ReconnectDialogConfiguration
Sets the interval (in milliseconds) between reconnect attempts.- Specified by:
setReconnectInterval
in interfaceReconnectDialogConfiguration
- Parameters:
reconnectInterval
- the interval (in ms) between reconnect attempts
-