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()
TimeTask
isFinished
in class TimeTask
TimeTask.setFinished(boolean)
public void setFinished(boolean value)
TimeTask
TimeTask.run()
method will not be called anymore.setFinished
in class TimeTask
TimeTask.isFinished()
public long getPeriod()
TimeTask
getPeriod
in class TimeTask
TimeTask.isPeriodic()
public boolean isPeriodic()
TimeTask
isPeriodic
in class TimeTask
TimeTask.getPeriod()
public long getNextExecutionTime()
TimeTask
TimeTask.run()
method is called.getNextExecutionTime
in class TimeTask
TimeTask.setNextExecutionTime(long)
public void setNextExecutionTime(long time)
TimeTask
setNextExecutionTime
in class TimeTask
TimeTask.getNextExecutionTime()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public long getOccurrences()
public long getDate()
public boolean getFixedRate()
TimeTask
getFixedRate
in class TimeTask