public class ClientServerEventHandler
extends java.lang.Object
Coordinates asynchronous backend events dispatched via DBManEvent,
including maintenance locks, shutdown/disconnect countdowns, server health updates,
and system broadcast messages. If customized script hooks (e.g. onShutdownInitiated)
are defined in the user profile, they take precedence over default UI dialog handlers.
| Constructor and Description |
|---|
ClientServerEventHandler(ClientContextI _ctx,
ClientDialogHelper _dialogHelper)
Constructs a new handler for backend server notifications and lifecycle state changes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
forcedClientDisconnectInitiated(int cSecsDelay,
java.lang.String msg)
Handles an incoming request for a forced client disconnect.
|
void |
forcedClientDisconnectInitiatedDefault(int cSecsDelay,
java.lang.String msg)
Standard UI fallback for an initiated forced disconnect.
|
void |
forcedClientDisconnectStopped()
Handles the cancellation of a previously initiated forced client disconnect.
|
void |
forcedClientDisconnectStoppedDefault()
Standard UI fallback when a forced client disconnect is canceled.
|
void |
receivedSystemMessage(java.lang.String msg,
java.lang.String sender)
Handles a system broadcast notification received from the server.
|
void |
receivedSystemMessageDefault(java.lang.String msg,
java.lang.String sender)
Standard UI fallback for displaying an incoming broadcast system message.
|
void |
serverLocked()
Lifecycle hook triggered when the backend server enters maintenance lock mode.
|
void |
serverShutdown(java.util.Date dateShutdown)
Lifecycle hook invoked when the backend server has finalized shutdown.
|
void |
serverShutdownDefault(java.util.Date dateNow,
java.util.Date dateShutdown)
Standard UI fallback executed upon finalized server shutdown.
|
void |
serverShutdownInitiated(int cSecsDelay,
java.lang.String msg)
Handles an initiated server shutdown notification.
|
void |
serverShutdownInitiatedDefault(int cSecsDelay,
java.lang.String msg)
Standard UI fallback for an initiated server shutdown.
|
void |
serverShutdownStopped()
Handles the cancellation of an active server shutdown sequence.
|
void |
serverShutdownStoppedDefault()
Standard UI fallback when a server shutdown sequence is canceled.
|
void |
serverUnlocked()
Lifecycle hook triggered when the backend server leaves maintenance lock mode.
|
void |
updateServerHealth(DBManServerHealthEvent she)
Lifecycle hook triggered when a server health update event is received.
|
public ClientServerEventHandler(ClientContextI _ctx, ClientDialogHelper _dialogHelper)
_ctx - client runtime context supplying environment access and core subsystems_dialogHelper - dialog helper used for displaying notifications and confirmation alertspublic void updateServerHealth(DBManServerHealthEvent she)
Informs all registered plugins of the updated backend performance, workload metrics, and health thresholds.
she - backend server health event payloadpublic void forcedClientDisconnectInitiated(int cSecsDelay,
java.lang.String msg)
Informs all registered plugins of the incoming request and executes an associated
script hook if defined, or falls back to forcedClientDisconnectInitiatedDefault(int, String).
cSecsDelay - countdown delay in centiseconds before disconnect takes effectmsg - optional notice or disconnection reason from the serverpublic void forcedClientDisconnectInitiatedDefault(int cSecsDelay,
java.lang.String msg)
Displays a non-modal warning dialog to the user.
cSecsDelay - countdown delay in centiseconds before disconnect takes effectmsg - optional notice or disconnection reason from the serverpublic void forcedClientDisconnectStopped()
Informs all registered plugins of the cancellation and calls
forcedClientDisconnectInitiatedDefault(int, String).
cSecsDelay - countdown delay in centiseconds before disconnect takes effectmsg - optional notice or disconnection reason from the serverpublic void forcedClientDisconnectStoppedDefault()
Displays a non-modal info dialog to the user.
public void serverShutdownInitiated(int cSecsDelay,
java.lang.String msg)
Informs all registered plugins of the initiated server shutdown and executes
the custom onShutdownInitiated script hook if present.
Otherwise, falls back to serverShutdownInitiatedDefault(int, String).
cSecsDelay - shutdown countdown delay in centisecondsmsg - optional broadcast notice from the server administratorpublic void serverShutdownInitiatedDefault(int cSecsDelay,
java.lang.String msg)
Displays a non-modal countdown notification.
cSecsDelay - shutdown countdown delay in centisecondsmsg - optional broadcast notice from the server administratorpublic void serverShutdownStopped()
Informs all registered plugins of the active server shutdown sequence and executes
the custom onShutdownStopped script hook if present.
Otherwise, falls back to serverShutdownStoppedDefault().
public void serverShutdownStoppedDefault()
Displays a non-modal info dialog to the user.
public void serverShutdown(java.util.Date dateShutdown)
Informs all registered plugins of the shutdown and executes the custom
onShutdown script hook if present.
Otherwise, falls back to serverShutdownDefault(Date, Date).
dateShutdown - timestamp when the server terminatedpublic void serverShutdownDefault(java.util.Date dateNow,
java.util.Date dateShutdown)
Displays a non-modal warning dialog to the user.
dateNow - current client timestampdateShutdown - timestamp when the server terminatedpublic void receivedSystemMessage(java.lang.String msg,
java.lang.String sender)
Passes message details to the onSystemMessage script hook if defined.
If no script hook is present, falls back to receivedSystemMessageDefault(String, String).
msg - broadcast message payloadsender - originating userpublic void receivedSystemMessageDefault(java.lang.String msg,
java.lang.String sender)
Presents the broadcast text to the user via a standardized non-modal message dialog.
msg - broadcast message payloadsender - originating userpublic void serverLocked()
Executes the custom onServerLocked script hook if defined.
public void serverUnlocked()
Executes the custom onServerUnlocked script hook if defined.
Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.