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
SystemReadyMonitor
implementation 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 String
getFailureCause()
Obtain the cause of aSystemState.FAILURE
.SystemState
getSystemState()
Obtain current system status as one of few possible enumerated values.void
ready()
void
registerListener(SystemReadyListener listener)
Allows components to register a listener which will be notified when the system ready state is changing.protected void
setSystemFailureCause(Throwable cause)
protected void
setSystemState(SystemState state)
-
-
-
Method Detail
-
registerListener
public void registerListener(SystemReadyListener listener)
Description copied from interface:SystemReadyMonitor
Allows components to register a listener which will be notified when the system ready state is changing.- Specified by:
registerListener
in interfaceSystemReadyMonitor
-
getSystemState
public SystemState getSystemState()
Description copied from interface:SystemReadyMonitorMXBean
Obtain current system status as one of few possible enumerated values.- Specified by:
getSystemState
in interfaceSystemReadyMonitorMXBean
-
getFailureCause
public String getFailureCause()
Description copied from interface:SystemReadyMonitorMXBean
Obtain the cause of aSystemState.FAILURE
.- Specified by:
getFailureCause
in interfaceSystemReadyMonitorMXBean
-
ready
public void ready()
-
setSystemState
protected void setSystemState(SystemState state)
-
setSystemFailureCause
protected void setSystemFailureCause(Throwable cause)
-
-