Package 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.
-
-
Constructor Summary
Constructors Constructor Description TimeoutHandler(Map callbacks, ServerContextInformation contextInfo)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run()
Checks if the timeout has expired for each callback in the callback store.-
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
-
-
-
Constructor Detail
-
TimeoutHandler
public TimeoutHandler(Map callbacks, ServerContextInformation contextInfo)
-
-