public abstract class TimerTask extends TimeTask
| Constructor and Description |
|---|
TimerTask(javax.management.timer.TimerNotification n,
java.util.Date date,
long period,
long occurrences,
boolean fixedRate) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
long |
getDate() |
boolean |
getFixedRate()
Returns whether this task is a fixed rate or fixed delay task.
|
long |
getNextExecutionTime()
Returns the next time at which the task will be executed, ie the
TimeTask.run() method is called. |
javax.management.timer.TimerNotification |
getNotification() |
long |
getOccurrences() |
long |
getPeriod()
Returns the period of this task.
|
int |
hashCode() |
boolean |
isFinished()
Returns whethere this task is finished.
|
boolean |
isPeriodic()
Returns whether this task is periodic.
|
void |
setFinished(boolean value)
Marks this task as finished or not.
|
void |
setNextExecutionTime(long time)
Sets the next execution time.
|
public TimerTask(javax.management.timer.TimerNotification n,
java.util.Date date,
long period,
long occurrences,
boolean fixedRate)
public javax.management.timer.TimerNotification getNotification()
public boolean isFinished()
TimeTaskisFinished in class TimeTaskTimeTask.setFinished(boolean)public void setFinished(boolean value)
TimeTaskTimeTask.run() method will not be called anymore.setFinished in class TimeTaskTimeTask.isFinished()public long getPeriod()
TimeTaskgetPeriod in class TimeTaskTimeTask.isPeriodic()public boolean isPeriodic()
TimeTaskisPeriodic in class TimeTaskTimeTask.getPeriod()public long getNextExecutionTime()
TimeTaskTimeTask.run() method is called.getNextExecutionTime in class TimeTaskTimeTask.setNextExecutionTime(long)public void setNextExecutionTime(long time)
TimeTasksetNextExecutionTime in class TimeTaskTimeTask.getNextExecutionTime()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic long getOccurrences()
public long getDate()
public boolean getFixedRate()
TimeTaskgetFixedRate in class TimeTask