Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_DELAY
Default delay before watchdog starts to monitor status task.
|
static int |
DEFAULT_PERIOD
Default period how often the task status is checked in Beaker.
|
Constructor and Description |
---|
TaskWatchdog(com.github.vjuranek.beaker4j.remote_model.BeakerTask task,
com.github.vjuranek.beaker4j.remote_model.TaskStatus status) |
Modifier and Type | Method and Description |
---|---|
com.github.vjuranek.beaker4j.remote_model.TaskStatus |
getOldStatus() |
com.github.vjuranek.beaker4j.remote_model.TaskStatus |
getStatus() |
boolean |
isFinished() |
void |
run()
Gets task status info from Beaker server and if the status has changed, notifies all waiting classes.
|
cancel, scheduledExecutionTime
public static final int DEFAULT_DELAY
public static final int DEFAULT_PERIOD
public TaskWatchdog(com.github.vjuranek.beaker4j.remote_model.BeakerTask task, com.github.vjuranek.beaker4j.remote_model.TaskStatus status)
task
- Task to be monitoredstatus
- Initial task statuspublic void run()
public com.github.vjuranek.beaker4j.remote_model.TaskStatus getStatus()
public com.github.vjuranek.beaker4j.remote_model.TaskStatus getOldStatus()
public boolean isFinished()
Copyright © 2016–2019. All rights reserved.