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 java.lang.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(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
This method is used to return the name of theFiber
.boolean
getStartCalled()
int
getStatus()
This method is used to get the current status of theFiber
.java.lang.String
getStatusText()
statusvoid
pause()
This method is used to suspend a currently runningFiber
.void
resume()
This method is used to resume a suspenededFiber
.void
start()
This method is used to start the initialization process of theFiber
, which should eventually transition to aRUNNING
status.void
stop()
This method is used to stop a currently runningFiber
.
-
-
-
Method Detail
-
getStatusText
public java.lang.String getStatusText()
Description copied from interface:ServiceDaemon
status
- Specified by:
getStatusText
in interfaceServiceDaemon
- Returns:
- a
String
object.
-
pause
public void pause()
Description copied from interface:PausableFiber
This method is used to suspend a currently runningFiber
. When invoked theFiber
will begin the transition to aPAUSED
status after changing its internal state, if applicable.- Specified by:
pause
in interfacePausableFiber
-
resume
public void resume()
Description copied from interface:PausableFiber
This 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:
resume
in interfacePausableFiber
-
getName
public java.lang.String getName()
Description copied from interface:Fiber
This 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:Fiber
This method is used to get the current status of theFiber
. The status of the fiber should be one of the predefined constants of theFiber
interface, or from one of the derived interfaces.
-
start
public void start()
Description copied from interface:Fiber
This method is used to start the initialization process of theFiber
, which should eventually transition to aRUNNING
status.
-
getStartCalled
public boolean getStartCalled()
-
-