Class Timeout
java.lang.Object
java.util.TimerTask
org.apache.camel.processor.resequencer.Timeout
- All Implemented Interfaces:
Runnable
A timer task that notifies handlers about scheduled timeouts.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the timeout handler that has been registered for notification.voidrun()Notifies the timeout handler about the scheduled timeout.voidschedule()Schedules this timeout task.voidsetTimeoutHandler(TimeoutHandler timeoutHandler) Sets a timeout handler for receiving timeout notifications.Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
-
Constructor Details
-
Timeout
Creates a new timeout task using the givenTimerinstance and timeout value. The task is not scheduled immediately. It will be scheduled by calling this task'sschedule()method.- Parameters:
timer- a timertimeout- a timeout value.
-
-
Method Details
-
getTimeoutHandlers
Returns the timeout handler that has been registered for notification.- Returns:
- the timeout handler.
-
setTimeoutHandler
Sets a timeout handler for receiving timeout notifications.- Parameters:
timeoutHandler- a timeout handler.
-
schedule
public void schedule()Schedules this timeout task. -
run
public void run()Notifies the timeout handler about the scheduled timeout.
-