|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.directwebremoting.util.StaticTimer
public class StaticTimer
A Timer
can manage many TimerTask
s, but each Timer
requires a new thread to operate, so it makes more sense to share a Timer
amongst man TimerTask
s.
There are a number of things that this class does not do that it perhaps should, for example, to count the number of outstanding tasks, and to drop the thread when there are none, however in a server using reverse ajax it is likely that there will be another one soon, and a lightly loaded server is not in need of careful thread management.
Constructor Summary | |
---|---|
StaticTimer()
|
Method Summary | |
---|---|
static void |
schedule(java.util.TimerTask task,
java.util.Date time)
Schedules the specified task for execution at the specified time. |
static void |
schedule(java.util.TimerTask task,
java.util.Date firstTime,
long period)
Schedules the specified task for repeated fixed-delay execution, beginning at the specified time. |
static void |
schedule(java.util.TimerTask task,
long delay)
Schedules the specified task for execution after the specified delay. |
static void |
schedule(java.util.TimerTask task,
long delay,
long period)
Schedules the specified task for repeated fixed-delay execution, beginning after the specified delay. |
static void |
scheduleAtFixedRate(java.util.TimerTask task,
java.util.Date firstTime,
long period)
Schedules the specified task for repeated fixed-rate execution, beginning at the specified time. |
static void |
scheduleAtFixedRate(java.util.TimerTask task,
long delay,
long period)
Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StaticTimer()
Method Detail |
---|
public static void schedule(java.util.TimerTask task, long delay)
task
- task to be scheduled.delay
- delay in milliseconds before task is to be executed.Timer.schedule(TimerTask, long)
public static void schedule(java.util.TimerTask task, java.util.Date time)
task
- task to be scheduled.time
- time at which task is to be executed.Timer.schedule(TimerTask, Date)
public static void schedule(java.util.TimerTask task, long delay, long period)
task
- task to be scheduled.delay
- delay in milliseconds before task is to be executed.period
- time in milliseconds between successive task executions.Timer.schedule(TimerTask, long, long)
public static void schedule(java.util.TimerTask task, java.util.Date firstTime, long period)
task
- task to be scheduled.firstTime
- First time at which task is to be executed.period
- time in milliseconds between successive task executions.Timer.schedule(TimerTask, Date, long)
public static void scheduleAtFixedRate(java.util.TimerTask task, long delay, long period)
task
- task to be scheduled.delay
- delay in milliseconds before task is to be executed.period
- time in milliseconds between successive task executions.Timer.scheduleAtFixedRate(TimerTask, Date, long)
public static void scheduleAtFixedRate(java.util.TimerTask task, java.util.Date firstTime, long period)
task
- task to be scheduled.firstTime
- First time at which task is to be executed.period
- time in milliseconds between successive task executions.Timer.scheduleAtFixedRate(TimerTask, Date, long)
|
Copyright ? 2005 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |