RequestTimeoutTask
public class RequestTimeoutTask
extends java.lang.Object
All Implemented Interfaces:
com.mobius.software.common.dal.timers.Task, com.mobius.software.common.dal.timers.Timer
This class handles the expiration of an SMPP request. It ensures that if a response to a PduRequest is not received within a specified time, the request is considered timed out. This prevents the system from waiting indefinitely and helps maintain session reliability.
Fields:
static org.apache.logging.log4j.Logger | logger |
Constructor:
public RequestTimeoutTask(SmppSessionImpl session, PduRequest request, long timeout)
session: The session where the request was sent.
request: The original PduRequest object waiting for a response.
timeout: Timeout period in milliseconds.
Creates a new timeout task for the given SMPP request.
Methods:
public PduRequest getRequest() | Returns the PduRequest associated with this timeout task. |
public void execute() | Invoked when the timeout occurs; handles request expiration logic. |
public long getStartTime() | Returns the timestamp when this task was scheduled to start. |
public Long getRealTimestamp() | Provides the real-time reference for scheduling evaluations. |
public void stop() | Stops the task if it no longer needs to run (e.g., response received). |
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!