public interface Watchable
Modifier and Type | Field and Description |
---|---|
static int |
COMPLETED |
static int |
ERROR |
static int |
NEEDS_DATA |
static int |
NOT_STARTED |
static int |
PAUSED |
static int |
RUNNING |
static int |
STOPPED |
static int |
UNKNOWN
the possible statuses
|
Modifier and Type | Method and Description |
---|---|
int |
getStatus()
Get the status of this watchable
|
void |
go()
Start this watchable and run until it is finished or stopped.
|
void |
go(int steps)
Start this watchable and run for the given number of steps or until
finished or stopped.
|
void |
go(long millis)
Start this watchable and run for the given amount of time, or until
finished or stopped.
|
void |
stop()
Stop this watchable.
|
static final int UNKNOWN
static final int NOT_STARTED
static final int PAUSED
static final int NEEDS_DATA
static final int RUNNING
static final int STOPPED
static final int COMPLETED
static final int ERROR
int getStatus()
void stop()
void go()
void go(int steps)
steps
- the number of steps to run forvoid go(long millis)
millis
- the number of milliseconds to run for