ST_CANCELLED, ST_EXPIRED, ST_INIT| 构造器和说明 |
|---|
ReschedulingTask(Timer timer,
Runnable task,
Trigger trigger,
ErrorHandler errorHandler) |
ReschedulingTask(Timer timer,
TimerTask task,
Trigger trigger,
ErrorHandler errorHandler) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
cancel()
Attempts to cancel the
TimerTask associated with this handle. |
boolean |
isCancelled()
Returns
true if and only if the TimerTask associated
with this handle has been cancelled. |
boolean |
isExpired()
Returns
true if and only if the TimerTask associated
with this handle has been expired. |
void |
run(Timeout timeout)
Executed after the delay specified with
Timer.newTimeout(TimerTask, long, TimeUnit). |
Timeout |
schedule()
对象创建完毕后,调用该方法
|
TimerTask |
task()
Returns the
TimerTask which is associated with this handle. |
Timer |
timer()
Returns the
Timer that created this handle. |
public ReschedulingTask(Timer timer, Runnable task, Trigger trigger, ErrorHandler errorHandler)
public ReschedulingTask(Timer timer, TimerTask task, Trigger trigger, ErrorHandler errorHandler)
public Timeout schedule()
public void run(Timeout timeout) throws Exception
TimerTaskTimer.newTimeout(TimerTask, long, TimeUnit).public TimerTask task()
TimeoutTimerTask which is associated with this handle.public boolean isExpired()
Timeouttrue if and only if the TimerTask associated
with this handle has been expired.public boolean isCancelled()
Timeouttrue if and only if the TimerTask associated
with this handle has been cancelled.isCancelled 在接口中 TimeoutCopyright © 2022. All rights reserved.