|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
org.apache.camel.processor.resequencer.Timeout
public class Timeout
A timer task that notifies handlers about scheduled timeouts.
Timer
,
TimerTask
Constructor Summary | |
---|---|
Timeout(Timer timer,
long timeout)
Creates a new timeout task using the given Timer instance a timeout value. |
Method Summary | |
---|---|
void |
addTimeoutHandler(TimeoutHandler handler)
Appends a new timeout handler at the end of the timeout handler list. |
void |
addTimeoutHandlerFirst(TimeoutHandler handler)
inserts a new timeout handler at the beginning of the timeout handler list. |
void |
clearTimeoutHandlers()
Removes all timeout handlers from the timeout handler list. |
List<TimeoutHandler> |
getTimeoutHandlers()
Returns the list of timeout handlers that have been registered for notification. |
void |
run()
Notifies all timeout handlers about the scheduled timeout. |
void |
schedule()
Schedules this timeout task. |
Methods inherited from class java.util.TimerTask |
---|
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Timeout(Timer timer, long timeout)
Timer
instance a timeout value. The
task is not scheduled immediately. It will be scheduled by calling this
task's schedule()
method.
timer
- timeout
- Method Detail |
---|
public List<TimeoutHandler> getTimeoutHandlers()
public void addTimeoutHandler(TimeoutHandler handler)
handler
- a timeout handler.public void addTimeoutHandlerFirst(TimeoutHandler handler)
handler
- a timeout handler.public void clearTimeoutHandlers()
public void schedule()
public void run()
run
in interface Runnable
run
in class TimerTask
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |