Class TestSystemReadyMonitor
- java.lang.Object
-
- org.opendaylight.infrautils.ready.testutils.TestSystemReadyMonitor
-
- All Implemented Interfaces:
SystemReadyMonitor
,SystemReadyMonitorMXBean
public class TestSystemReadyMonitor extends Object implements SystemReadyMonitor
SystemReadyMonitor
implementation suitable for tests. TheTestSystemReadyMonitor.Behaviour
selects what it actually does.- Author:
- Michael Vorburger.ch
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TestSystemReadyMonitor.Behaviour
-
Constructor Summary
Constructors Constructor Description TestSystemReadyMonitor(TestSystemReadyMonitor.Behaviour behaviour)
-
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
registerListener(SystemReadyListener listener)
Allows components to register a listener which will be notified when the system ready state is changing.
-
-
-
Constructor Detail
-
TestSystemReadyMonitor
public TestSystemReadyMonitor(TestSystemReadyMonitor.Behaviour behaviour)
-
-
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
-
-