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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
DIALOG_TEXT_DEFAULT
static String
DIALOG_TEXT_GAVE_UP_DEFAULT
static String
DIALOG_TEXT_GAVE_UP_KEY
static String
DIALOG_TEXT_KEY
static int
RECONNECT_ATTEMPTS_DEFAULT
static String
RECONNECT_ATTEMPTS_KEY
static int
RECONNECT_INTERVAL_DEFAULT
static String
RECONNECT_INTERVAL_KEY
-
Constructor Summary
Constructors Constructor Description ReconnectDialogConfigurationMap(StateNode node)
Creates a new map for the given node.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDialogText()
Gets the text to show in the reconnect dialog when trying to re-establish the server connection.String
getDialogTextGaveUp()
Gets the text to show in the reconnect dialog after giving up trying to reconnect (ReconnectDialogConfiguration.getReconnectAttempts()
reached).int
getReconnectAttempts()
Gets the number of times to try to reconnect to the server before giving up.int
getReconnectInterval()
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 Detail
-
DIALOG_TEXT_KEY
public static final String DIALOG_TEXT_KEY
- See Also:
- Constant Field Values
-
DIALOG_TEXT_DEFAULT
public static final String DIALOG_TEXT_DEFAULT
- See Also:
- Constant Field Values
-
DIALOG_TEXT_GAVE_UP_KEY
public static final String DIALOG_TEXT_GAVE_UP_KEY
- See Also:
- Constant Field Values
-
DIALOG_TEXT_GAVE_UP_DEFAULT
public static final String DIALOG_TEXT_GAVE_UP_DEFAULT
- See Also:
- Constant Field Values
-
RECONNECT_ATTEMPTS_KEY
public static final String RECONNECT_ATTEMPTS_KEY
- See Also:
- Constant Field Values
-
RECONNECT_ATTEMPTS_DEFAULT
public static final int RECONNECT_ATTEMPTS_DEFAULT
- See Also:
- Constant Field Values
-
RECONNECT_INTERVAL_KEY
public static final String RECONNECT_INTERVAL_KEY
- See Also:
- Constant Field Values
-
RECONNECT_INTERVAL_DEFAULT
public static final int RECONNECT_INTERVAL_DEFAULT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ReconnectDialogConfigurationMap
public ReconnectDialogConfigurationMap(StateNode node)
Creates a new map for the given node.- Parameters:
node
- the node that the map belongs to
-
-
Method Detail
-
getDialogText
public String 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
public void setDialogText(String dialogText)
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
public String 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
public void setDialogTextGaveUp(String dialogTextGaveUp)
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
-
-