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
-
Method Summary
Modifier and TypeMethodDescriptionReturns the timeout handler that has been registered for notification.void
run()
Notifies the timeout handler about the scheduled timeout.void
schedule()
Schedules this timeout task.void
setTimeoutHandler
(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 givenTimer
instance 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.
-