|
||||||||||
| 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()
Lazy constructions of the TimeoutFactory singleton |
boolean |
isCancelled()
Returns true if the TimeoutFactory has been cancelled, false if it is operational (i.e. |
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)
public TimeoutFactory()
| Method Detail |
|---|
public static TimeoutFactory getSingleton()
public static Timeout createTimeout(long time,
TimeoutTarget 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 runpublic void cancel()
public boolean isCancelled()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||