public class ReconnectDialogConfigurationMap extends NodeMap implements ReconnectDialogConfiguration
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 and Description |
---|
ReconnectDialogConfigurationMap(StateNode node)
Creates a new map for the given node.
|
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.
|
clear, collectChanges, contains, forEachChild, generateChangesFromEmpty, get, getOrDefault, getOrDefault, getOrDefault, keySet, mayUpdateFromClient, put, put, remove, updateFromClient
allowsChanges, attachPotentialChild, detatchPotentialChild, getNode, onAttach, onDetach
public static final String DIALOG_TEXT_KEY
public static final String DIALOG_TEXT_DEFAULT
public static final String DIALOG_TEXT_GAVE_UP_KEY
public static final String DIALOG_TEXT_GAVE_UP_DEFAULT
public static final String RECONNECT_ATTEMPTS_KEY
public static final int RECONNECT_ATTEMPTS_DEFAULT
public static final String RECONNECT_INTERVAL_KEY
public static final int RECONNECT_INTERVAL_DEFAULT
public static final String DIALOG_GRACE_PERIOD_KEY
public static final int DIALOG_GRACE_PERIOD_DEFAULT
public static final String DIALOG_MODAL_KEY
public static final boolean DIALOG_MODAL_DEFAULT
public ReconnectDialogConfigurationMap(StateNode node)
node
- the node that the map belongs topublic String getDialogText()
ReconnectDialogConfiguration
The default is
getDialogText
in interface ReconnectDialogConfiguration
public void setDialogText(String dialogText)
ReconnectDialogConfiguration
setDialogText
in interface ReconnectDialogConfiguration
dialogText
- the text to show in the reconnect dialogpublic String getDialogTextGaveUp()
ReconnectDialogConfiguration
ReconnectDialogConfiguration.getReconnectAttempts()
reached).
The default is
getDialogTextGaveUp
in interface ReconnectDialogConfiguration
public void setDialogTextGaveUp(String dialogTextGaveUp)
ReconnectDialogConfiguration
ReconnectDialogConfiguration.getReconnectAttempts()
reached).setDialogTextGaveUp
in interface ReconnectDialogConfiguration
dialogTextGaveUp
- the text to show in the reconnect dialog after giving uppublic int getReconnectAttempts()
ReconnectDialogConfiguration
The default is
getReconnectAttempts
in interface ReconnectDialogConfiguration
public void setReconnectAttempts(int reconnectAttempts)
ReconnectDialogConfiguration
setReconnectAttempts
in interface ReconnectDialogConfiguration
reconnectAttempts
- the number of times to try to reconnectpublic int getReconnectInterval()
ReconnectDialogConfiguration
The default is
getReconnectInterval
in interface ReconnectDialogConfiguration
public void setReconnectInterval(int reconnectInterval)
ReconnectDialogConfiguration
setReconnectInterval
in interface ReconnectDialogConfiguration
reconnectInterval
- the interval (in ms) between reconnect attemptspublic int getDialogGracePeriod()
ReconnectDialogConfiguration
The default is
getDialogGracePeriod
in interface ReconnectDialogConfiguration
public void setDialogGracePeriod(int dialogGracePeriod)
ReconnectDialogConfiguration
setDialogGracePeriod
in interface ReconnectDialogConfiguration
dialogGracePeriod
- the time to wait before showing a dialogpublic boolean isDialogModal()
ReconnectDialogConfiguration
The default is
isDialogModal
in interface ReconnectDialogConfiguration
ReconnectDialogConfiguration.setDialogModal(boolean)
public void setDialogModal(boolean dialogModal)
ReconnectDialogConfiguration
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.
setDialogModal
in interface ReconnectDialogConfiguration
dialogModal
- true to make the dialog modal, false otherwiseCopyright © 2020. All rights reserved.