Class QMUX.AsyncRequest
java.lang.Object
org.jpos.q2.iso.QMUX.AsyncRequest
- All Implemented Interfaces:
Runnable
- Enclosing class:
QMUX
Tracks an asynchronous request awaiting a response, with optional timeout
scheduling and elapsed-time measurement.
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncRequest(ISOResponseListener rl, Object handBack) Constructs an async request paired with the given listener and hand-back token. -
Method Summary
Modifier and TypeMethodDescriptionvoidresponseReceived(ISOMsg response) Notifies the listener that a response has been received, cancelling the timeout future.voidrun()voidsetFuture(ScheduledFuture future) Sets the scheduled future used to enforce the request timeout.
-
Constructor Details
-
AsyncRequest
Constructs an async request paired with the given listener and hand-back token.- Parameters:
rl- listener to invoke on response/expirationhandBack- opaque token relayed back torl
-
-
Method Details
-
setFuture
Sets the scheduled future used to enforce the request timeout.- Parameters:
future- timeout future, ornullfor no timeout
-
responseReceived
Notifies the listener that a response has been received, cancelling the timeout future.- Parameters:
response- inbound response message
-
run
-