|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.jonclark.util.Timeout
public class Timeout
A simple way of determining if a task has timed out. If the length of time specified by millis passes without the refresh() method being called then all TimeoutListeneres are notified that the task has become stale.
| Constructor Summary | |
|---|---|
Timeout()
|
|
| Method Summary | |
|---|---|
void |
addTimeoutListener(TimeoutListener t)
Adds a listener that will be notified of timeouts |
void |
cancel()
Disables this timeout |
void |
refresh()
Notifies the timer that the task is not stalled so that the timeout will not fire. |
void |
setTimeout(long timeoutMillis)
Set the timeout for this timeout using the default resolution. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Timeout()
| Method Detail |
|---|
public void setTimeout(long timeoutMillis)
timeoutMillis - public void cancel()
public void refresh()
public void addTimeoutListener(TimeoutListener t)
t - The TimeoutListener that will be notified
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||