com.vaadin.flow.internal.nodefeature.
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:
public class ReconnectDialogConfigurationMap extends NodeMap implements ReconnectDialogConfiguration
Map for storing the reconnect dialog configuration for a UI.
Since:
1.0
Author:
Vaadin Ltd
See Also:
-
-
Field Summary
Fields Modifier and Type Field and Description static int
DIALOG_GRACE_PERIOD_DEFAULT
static String
DIALOG_GRACE_PERIOD_KEY
static boolean
DIALOG_MODAL_DEFAULT
static String
DIALOG_MODAL_KEY
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 and Description ReconnectDialogConfigurationMap(StateNode node)
Creates a new map for the given node.
-
Method Summary
All Methods Modifier and Type Method and Description int
getDialogGracePeriod()
Gets the timeout (in milliseconds) between noticing a loss of connection and showing the dialog.
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.
boolean
isDialogModal()
Checks the modality of the dialog.
void
setDialogGracePeriod(int dialogGracePeriod)
Sets the timeout (in milliseconds) between noticing a loss of connection and showing the dialog.
void
setDialogModal(boolean dialogModal)
Sets the modality of the dialog.
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, 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:
-
DIALOG_TEXT_DEFAULT
public static final String DIALOG_TEXT_DEFAULT
See Also:
-
DIALOG_TEXT_GAVE_UP_KEY
public static final String DIALOG_TEXT_GAVE_UP_KEY
See Also:
-
DIALOG_TEXT_GAVE_UP_DEFAULT
public static final String DIALOG_TEXT_GAVE_UP_DEFAULT
See Also:
-
RECONNECT_ATTEMPTS_KEY
public static final String RECONNECT_ATTEMPTS_KEY
See Also:
-
RECONNECT_ATTEMPTS_DEFAULT
public static final int RECONNECT_ATTEMPTS_DEFAULT
See Also:
-
RECONNECT_INTERVAL_KEY
public static final String RECONNECT_INTERVAL_KEY
See Also:
-
RECONNECT_INTERVAL_DEFAULT
public static final int RECONNECT_INTERVAL_DEFAULT
See Also:
-
DIALOG_GRACE_PERIOD_KEY
public static final String DIALOG_GRACE_PERIOD_KEY
See Also:
-
DIALOG_GRACE_PERIOD_DEFAULT
public static final int DIALOG_GRACE_PERIOD_DEFAULT
See Also:
-
DIALOG_MODAL_KEY
public static final String DIALOG_MODAL_KEY
See Also:
-
DIALOG_MODAL_DEFAULT
public static final boolean DIALOG_MODAL_DEFAULT
See Also:
-
-
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
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
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
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
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
-
getDialogGracePeriod
public int getDialogGracePeriod()
Description copied from interface:
ReconnectDialogConfiguration
Gets the timeout (in milliseconds) between noticing a loss of connection and showing the dialog.
The default is
Specified by:
getDialogGracePeriod
in interfaceReconnectDialogConfiguration
Returns:
the time to wait before showing a dialog
-
setDialogGracePeriod
public void setDialogGracePeriod(int dialogGracePeriod)
Description copied from interface:
ReconnectDialogConfiguration
Sets the timeout (in milliseconds) between noticing a loss of connection and showing the dialog.
Specified by:
setDialogGracePeriod
in interfaceReconnectDialogConfiguration
Parameters:
dialogGracePeriod
- the time to wait before showing a dialog
-
isDialogModal
public boolean isDialogModal()
Description copied from interface:
ReconnectDialogConfiguration
Checks the modality of the dialog.
The default is
Specified by:
isDialogModal
in interfaceReconnectDialogConfiguration
Returns:
true if the dialog is modal, false otherwise
See Also:
-
setDialogModal
public void setDialogModal(boolean dialogModal)
Description copied from interface:
ReconnectDialogConfiguration
Sets the modality of the dialog.
If the dialog is set to modal, it will prevent the usage of the application while the dialog is being shown. If not modal, the user can continue to use the application as normally and all server events will be queued until connection has been re-established.
Specified by:
setDialogModal
in interfaceReconnectDialogConfiguration
Parameters:
dialogModal
- true to make the dialog modal, false otherwise
-
-