|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.util.timeout.TimeoutFactory
public class TimeoutFactory
The timeout factory.
| Constructor Summary | |
|---|---|
TimeoutFactory()
Constructs a new TimeoutFactory that uses the default thread pool |
|
TimeoutFactory(ThreadPool threadPool)
Constructs a new TimeoutFactory that uses the provided ThreadPool |
|
| Method Summary | |
|---|---|
void |
cancel()
Cancels all submitted tasks, stops the worker thread and clean-ups everything except for the thread pool. |
static Timeout |
createTimeout(long time,
TimeoutTarget target)
Schedules a new timeout using the singleton TimeoutFactory |
static TimeoutFactory |
getSingleton()
|
boolean |
isCancelled()
|
Timeout |
schedule(long time,
Runnable run)
Schedules a new timeout. |
Timeout |
schedule(long time,
TimeoutTarget target)
Schedules a new timeout. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeoutFactory(ThreadPool threadPool)
threadPool - public TimeoutFactory()
| Method Detail |
|---|
public static TimeoutFactory getSingleton()
public static Timeout createTimeout(long time,
TimeoutTarget target)
time - target -
public Timeout schedule(long time,
TimeoutTarget target)
time - absolute timetarget - target to fire
public Timeout schedule(long time,
Runnable run)
time - absolute timerun - runnable to run
public void cancel()
public boolean isCancelled()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||