public class Watchdog extends Object
Watchdog.WatchJob at
intervals and takes orders such as suspend(), resume() or
stop() from the caller. of course we can view its status at any time
by calling isJobDoing(), isSleeping() or
isSuspended().| 限定符和类型 | 类和说明 |
|---|---|
static interface |
Watchdog.JobInterrupttedHandler |
static interface |
Watchdog.WatchJob |
| 构造器和说明 |
|---|
Watchdog(Watchdog.WatchJob job) |
Watchdog(Watchdog.WatchJob job,
long intervalMS) |
Watchdog(Watchdog.WatchJob job,
long intervalMS,
String name) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
getIntervalMS() |
long |
getJobTimes() |
String |
getName() |
boolean |
isAlive() |
boolean |
isJobDoing() |
boolean |
isPaused() |
boolean |
isSleeping() |
boolean |
isSuspended() |
void |
pause() |
void |
resume() |
void |
setJobInterrupttedHandler(Watchdog.JobInterrupttedHandler jobInterrupttedHandler) |
Watchdog |
start() |
void |
stop() |
void |
suspend() |
String |
toString() |
public Watchdog(Watchdog.WatchJob job)
public Watchdog(Watchdog.WatchJob job, long intervalMS)
public Watchdog(Watchdog.WatchJob job, long intervalMS, String name)
public Watchdog start()
public void stop()
public void suspend()
public void pause()
public void resume()
public boolean isAlive()
public boolean isSleeping()
public boolean isJobDoing()
public long getJobTimes()
Watchdog.WatchJobpublic boolean isSuspended()
public boolean isPaused()
public long getIntervalMS()
Watchdog.WatchJobpublic String getName()
public void setJobInterrupttedHandler(Watchdog.JobInterrupttedHandler jobInterrupttedHandler)
Copyright © 2017. All rights reserved.