Class SimpleSystemReadyMonitor
- java.lang.Object
-
- org.opendaylight.infrautils.ready.spi.SimpleSystemReadyMonitor
-
- All Implemented Interfaces:
SystemReadyMonitor,SystemReadyMonitorMXBean
- Direct Known Subclasses:
KarafSystemReady
public class SimpleSystemReadyMonitor extends Object implements SystemReadyMonitor
SystemReadyMonitorimplementation for a "simple" (standalone, Java SE) environment. Also used as the base class for the Karaf/OSGi specific implementation.- Author:
- Michael Vorburger.ch, based on code from myself, Tom (concurrency) & Faseela in KarafSystemReadyImpl
-
-
Constructor Summary
Constructors Constructor Description SimpleSystemReadyMonitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFailureCause()Obtain the cause of aSystemState.FAILURE.SystemStategetSystemState()Obtain current system status as one of few possible enumerated values.voidready()voidregisterListener(SystemReadyListener listener)Allows components to register a listener which will be notified when the system ready state is changing.protected voidsetSystemFailureCause(Throwable cause)protected voidsetSystemState(SystemState state)
-
-
-
Method Detail
-
registerListener
public void registerListener(SystemReadyListener listener)
Description copied from interface:SystemReadyMonitorAllows components to register a listener which will be notified when the system ready state is changing.- Specified by:
registerListenerin interfaceSystemReadyMonitor
-
getSystemState
public SystemState getSystemState()
Description copied from interface:SystemReadyMonitorMXBeanObtain current system status as one of few possible enumerated values.- Specified by:
getSystemStatein interfaceSystemReadyMonitorMXBean
-
getFailureCause
public String getFailureCause()
Description copied from interface:SystemReadyMonitorMXBeanObtain the cause of aSystemState.FAILURE.- Specified by:
getFailureCausein interfaceSystemReadyMonitorMXBean
-
ready
public void ready()
-
setSystemState
protected void setSystemState(SystemState state)
-
setSystemFailureCause
protected void setSystemFailureCause(Throwable cause)
-
-