Constructor and Description |
---|
Timeout(Timer timer,
long timeout)
Creates a new timeout task using the given
Timer instance and
timeout value. |
Modifier and Type | Method and 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.
|
cancel, scheduledExecutionTime
public Timeout(Timer timer, long timeout)
Timer
instance and
timeout value. The task is not scheduled immediately. It will be
scheduled by calling this task's schedule()
method.timer
- a timertimeout
- a timeout value.public TimeoutHandler getTimeoutHandlers()
public void setTimeoutHandler(TimeoutHandler timeoutHandler)
timeoutHandler
- a timeout handler.public void schedule()
Apache Camel