|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.util.DelayedTask
public class DelayedTask
a utility class to define a delayed task while allowing to easily postpone the execution at any time to the full delay time. This is particularly suitable for automatic logouts after a certain time of inaction.
| Constructor Summary | |
|---|---|
DelayedTask(ActionListener al,
long delay)
runs the given ActionListener in the event thread |
|
DelayedTask(Runnable r,
long delay)
|
|
DelayedTask(Task<?> task,
long delay)
|
|
| Method Summary | |
|---|---|
void |
cancel()
|
void |
close()
cancels this instance while ignoring exceptions thrown |
void |
delay()
|
void |
delay(long delayTime)
|
Exception |
getException()
|
long |
getTimeUntilExecution()
|
boolean |
hasRun()
|
boolean |
isRunning()
|
Task<?> |
unwrap()
returns the embedded instance that this wrapper encloses |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DelayedTask(ActionListener al,
long delay)
public DelayedTask(Runnable r,
long delay)
public DelayedTask(Task<?> task,
long delay)
| Method Detail |
|---|
public Task<?> unwrap()
Wrapped
unwrap in interface Wrapped<Task<?>>
public final void delay()
throws IllegalStateException
IllegalStateException
public final void delay(long delayTime)
throws IllegalStateException
IllegalStateExceptionpublic void close()
public void cancel()
throws IllegalStateException
IllegalStateExceptionpublic long getTimeUntilExecution()
public final boolean hasRun()
public final boolean isRunning()
public final Exception getException()
throws IllegalStateException
IllegalStateException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||