public class TimerTask extends Task
| Constructor and Description |
|---|
TimerTask(long timerPeriod)
Constructs a TimerTask.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
call()
Performs the timing.
|
void |
handleTimerCompleted()
Handles the condition where the timer completes normally.
|
void |
handleTimerInterrupted()
Handles the condition where the timer is interrupted.
|
void |
start(Executor executor)
Submit the task for execution on the specified Executor.
|
complete, finish, get, getDefaultExecutor, getExecutor, getThrowable, getTimeoutPeriod, isDone, isFailed, markCompleted, start, timeoutpublic TimerTask(long timerPeriod)
timerPeriod - timer period, in millisecondspublic final void start(Executor executor)
public void handleTimerCompleted()
public void handleTimerInterrupted()
Copyright © 2025. All rights reserved.