org.mortbay.thread
Class Timeout.Task
java.lang.Object
org.mortbay.thread.Timeout.Task
- Direct Known Subclasses:
- SelectChannelEndPoint.IdleTask
- Enclosing class:
- Timeout
public static class Timeout.Task
- extends Object
Task.
The base class for scheduled timeouts. This class should be
extended to implement the #expire()
or expired()
method, which is called if the
timeout expires.
- Author:
- gregw
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Timeout.Task
public Timeout.Task()
getTimestamp
public long getTimestamp()
getAge
public long getAge()
cancel
public void cancel()
- Cancel the task.
Remove the task from the timeout.
isExpired
public boolean isExpired()
isScheduled
public boolean isScheduled()
expired
public void expired()
- Expire task.
This method is called when the timeout expires. It is called
outside of any synchronization scope and may be delayed.
- See Also:
For a synchronized callback.
Copyright © 2008 Mort Bay Consulting. All Rights Reserved.