Package org.opennms.netmgt.model
Class MockServiceDaemon
- java.lang.Object
-
- org.opennms.netmgt.model.MockServiceDaemon
-
- All Implemented Interfaces:
Fiber,PausableFiber,MockServiceDaemonMBean,ServiceDaemon,ServiceDaemonMBean
public class MockServiceDaemon extends Object implements MockServiceDaemonMBean
-
-
Field Summary
-
Fields inherited from interface org.opennms.core.fiber.Fiber
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED
-
Fields inherited from interface org.opennms.core.fiber.PausableFiber
PAUSE_PENDING, PAUSED, RESUME_PENDING
-
-
Constructor Summary
Constructors Constructor Description MockServiceDaemon(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetName()This method is used to return the name of theFiber.booleangetStartCalled()intgetStatus()This method is used to get the current status of theFiber.StringgetStatusText()statusvoidpause()This method is used to suspend a currently runningFiber.voidresume()This method is used to resume a suspenededFiber.voidstart()This method is used to start the initialization process of theFiber, which should eventually transition to aRUNNINGstatus.voidstop()This method is used to stop a currently runningFiber.
-
-
-
Constructor Detail
-
MockServiceDaemon
public MockServiceDaemon(String name)
-
-
Method Detail
-
getStatusText
public String getStatusText()
Description copied from interface:ServiceDaemonstatus
- Specified by:
getStatusTextin interfaceServiceDaemon- Returns:
- a
Stringobject.
-
pause
public void pause()
Description copied from interface:PausableFiberThis method is used to suspend a currently runningFiber. When invoked theFiberwill begin the transition to aPAUSEDstatus after changing its internal state, if applicable.- Specified by:
pausein interfacePausableFiber
-
resume
public void resume()
Description copied from interface:PausableFiberThis method is used to resume a suspenededFiber. If the thread is already running then this method should have no effect on the currentFiber.- Specified by:
resumein interfacePausableFiber
-
getName
public String getName()
Description copied from interface:FiberThis method is used to return the name of theFiber. The name of the instance is defined by the implementor, but it should be realitively unique when possible.
-
getStatus
public int getStatus()
Description copied from interface:FiberThis method is used to get the current status of theFiber. The status of the fiber should be one of the predefined constants of theFiberinterface, or from one of the derived interfaces.
-
start
public void start()
Description copied from interface:FiberThis method is used to start the initialization process of theFiber, which should eventually transition to aRUNNINGstatus.
-
getStartCalled
public boolean getStartCalled()
-
-