org.opennms.netmgt.daemon
Class AbstractServiceDaemon
java.lang.Object
org.opennms.netmgt.daemon.AbstractServiceDaemon
- All Implemented Interfaces:
- org.opennms.core.fiber.Fiber, org.opennms.core.fiber.PausableFiber, org.opennms.netmgt.model.ServiceDaemon, org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
- Actiond, Capsd, Collectd, Dhcpd, Discovery, Eventd, EventTranslator, Notifd, PassiveStatusKeeper, Poller, RTCManager, Scriptd, Syslogd, Threshd, Trapd, Vacuumd, Vulnscand, Xmlrpcd
public abstract class AbstractServiceDaemon
- extends java.lang.Object
- implements org.opennms.netmgt.model.ServiceDaemon, org.springframework.beans.factory.InitializingBean
| Fields inherited from interface org.opennms.core.fiber.PausableFiber |
PAUSE_PENDING, PAUSED, RESUME_PENDING |
| Fields inherited from interface org.opennms.core.fiber.Fiber |
RUNNING, START_PENDING, STARTING, STATUS_NAMES, STOP_PENDING, STOPPED |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractServiceDaemon
protected AbstractServiceDaemon(java.lang.String name)
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
onInit
protected abstract void onInit()
onPause
protected void onPause()
onResume
protected void onResume()
onStart
protected void onStart()
onStop
protected void onStop()
getName
public final java.lang.String getName()
- Specified by:
getName in interface org.opennms.core.fiber.Fiber
setStatus
protected void setStatus(int status)
waitForStatus
protected void waitForStatus(int status,
long timeout)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
waitForStatus
protected void waitForStatus(int status)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
getStatus
public int getStatus()
- Specified by:
getStatus in interface org.opennms.core.fiber.Fiber
getStatusText
public java.lang.String getStatusText()
status
public java.lang.String status()
- Specified by:
status in interface org.opennms.netmgt.model.ServiceDaemon
isStartPending
protected boolean isStartPending()
isRunning
protected boolean isRunning()
isPaused
protected boolean isPaused()
isStarting
protected boolean isStarting()
log
protected org.apache.log4j.Category log()
init
public final void init()
pause
public final void pause()
- Specified by:
pause in interface org.opennms.core.fiber.PausableFiber
resume
public final void resume()
- Specified by:
resume in interface org.opennms.core.fiber.PausableFiber
start
public final void start()
- Specified by:
start in interface org.opennms.core.fiber.Fiber
stop
public final void stop()
- Stops the currently running service. If the service is not running then
the command is silently discarded.
- Specified by:
stop in interface org.opennms.core.fiber.Fiber
Copyright © 2007. All Rights Reserved.