public class WatchDog extends Object implements org.openbase.jul.iface.Activatable, org.openbase.jul.iface.Shutdownable
| Modifier and Type | Class and Description |
|---|---|
static class |
WatchDog.ServiceState |
| Modifier and Type | Field and Description |
|---|---|
static List<WatchDog> |
globalWatchDogList
Deprecated.
|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
WatchDog(org.openbase.jul.iface.Activatable task,
String serviceName) |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
void |
addObserver(Observer<WatchDog.ServiceState> observer) |
void |
deactivate() |
org.openbase.jul.iface.Activatable |
getService() |
String |
getServiceName() |
WatchDog.ServiceState |
getServiceState() |
boolean |
isActive() |
boolean |
isServiceDone() |
void |
removeObserver(Observer<WatchDog.ServiceState> observer) |
void |
shutdown() |
void |
skipActivation() |
String |
toString() |
void |
waitForServiceActivation() |
void |
waitForServiceActivation(long timeout,
TimeUnit timeUnit) |
void |
waitForServiceState(WatchDog.ServiceState serviceSatet) |
void |
waitForServiceState(WatchDog.ServiceState serviceState,
long timeout,
TimeUnit timeUnit) |
protected static final org.slf4j.Logger logger
@Deprecated public static final List<WatchDog> globalWatchDogList
public WatchDog(org.openbase.jul.iface.Activatable task,
String serviceName)
throws InstantiationException
InstantiationExceptionpublic void activate()
throws InterruptedException,
CouldNotPerformException
activate in interface org.openbase.jul.iface.ActivatableInterruptedExceptionCouldNotPerformExceptionpublic void deactivate()
throws InterruptedException
deactivate in interface org.openbase.jul.iface.ActivatableInterruptedExceptionpublic boolean isActive()
isActive in interface org.openbase.jul.iface.Activatablepublic boolean isServiceDone()
public String getServiceName()
public void waitForServiceActivation()
throws InterruptedException,
CouldNotPerformException
public void waitForServiceActivation(long timeout,
TimeUnit timeUnit)
throws InterruptedException,
CouldNotPerformException
public void waitForServiceState(WatchDog.ServiceState serviceSatet) throws InterruptedException, CouldNotPerformException
public void waitForServiceState(WatchDog.ServiceState serviceState, long timeout, TimeUnit timeUnit) throws InterruptedException, CouldNotPerformException
public void skipActivation()
public org.openbase.jul.iface.Activatable getService()
public WatchDog.ServiceState getServiceState()
public void addObserver(Observer<WatchDog.ServiceState> observer)
public void removeObserver(Observer<WatchDog.ServiceState> observer)
public void shutdown()
shutdown in interface org.openbase.jul.iface.ShutdownableCopyright © 2015–2017 openbase.org. All rights reserved.