HealthCheckTimer
Extends:
java.lang.Object
Implements:
com.mobius.software.common.dal.timers.Task
com.mobius.software.common.dal.timers.Timer
HealthCheckTimer is responsible for monitoring the health of an active SMPP session (client or server). It helps ensure that the connection remains responsive over time by tracking timeouts and triggering session-specific checks or cleanup logic when necessary.
Despite being in different packages, both classes have identical structure and behavior, differing only in whether they operate on a SmppSession or SmppServerSession.
Fields:
static org.apache.logging.log4j.Logger | logger |
Constructor:
public HealthCheckTimer(SmppSession session, long timeout) // client
public HealthCheckTimer(SmppServerSession session, long timeout) // server
Initializes the health check timer for the given session with the specified timeout duration.
Methods:
void execute() | Called periodically to perform a health check. Invoked by the scheduler. |
long getStartTime() | Returns the timestamp when the timer started. |
Long getRealTimestamp() | Returns the last recorded execution timestamp. |
void stop() | Stops the timer, disabling further checks. |
void restart() | Restarts the timer, resetting its internal state. |
Methods inherited from class java.lang.Object |
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | |
Methods inherited from interface com.mobius.software.common.dal.timers.Timer |
|
getQueueIndex |
Start innovating with Mobius
What's next? Let's talk!