org.apache.synapse.core.axis2
Class TimeoutHandler
java.lang.Object
java.util.TimerTask
org.apache.synapse.core.axis2.TimeoutHandler
- All Implemented Interfaces:
- Runnable
public class TimeoutHandler
- extends TimerTask
An object of this class is registered to be invoked in some predefined time intervals. This
checks the timeouts of callbacks stored in the SynapseCallbackReceiver and removes all expired
callbacks. Timeouts of the callbacks are stored as the time, not the duration. So that the
time or the interval of invoking this class does not affect the correctness of the timeouts,
although longer intervals would introduce larger error between the actual timeout and the
specified timeout.
For each invocation this gets a time value to be compared against the timeouts of the callback
objects. This time is the System.currentTimeMillis() for Java 1.4 and System.nanoTime() for
Java 1.5 and later.
Method Summary |
void |
run()
Checks if the timeout has expired for each callback in the callback store. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeoutHandler
public TimeoutHandler(Map callbacks,
ServerContextInformation contextInfo)
run
public void run()
- Checks if the timeout has expired for each callback in the callback store. If expired, removes
the callback. If specified sends a fault message to the client about the timeout.
- Specified by:
run
in interface Runnable
- Specified by:
run
in class TimerTask
Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.