Class Timeout
- java.lang.Object
-
- java.util.TimerTask
-
- org.apache.camel.processor.resequencer.Timeout
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimeoutHandler
getTimeoutHandlers()
Returns 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 Detail
-
Timeout
public Timeout(Timer timer, long 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 Detail
-
getTimeoutHandlers
public TimeoutHandler getTimeoutHandlers()
Returns the timeout handler that has been registered for notification.- Returns:
- the timeout handler.
-
setTimeoutHandler
public void setTimeoutHandler(TimeoutHandler timeoutHandler)
Sets a timeout handler for receiving timeout notifications.- Parameters:
timeoutHandler
- a timeout handler.
-
schedule
public void schedule()
Schedules this timeout task.
-
-