Package org.opennms.netmgt.passive
Class PassiveStatusKeeper
- java.lang.Object
-
- org.opennms.netmgt.daemon.AbstractServiceDaemon
-
- org.opennms.netmgt.passive.PassiveStatusKeeper
-
- All Implemented Interfaces:
Fiber
,PausableFiber
,SpringServiceDaemon
,EventListener
,ServiceDaemon
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class PassiveStatusKeeper extends AbstractServiceDaemon implements EventListener
PassiveStatusKeeper class.
- Author:
- Mathew Brozowski, David Hustace
-
-
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 PassiveStatusKeeper()
Constructor for PassiveStatusKeeper.PassiveStatusKeeper(EventIpcManager eventMgr)
Constructor for PassiveStatusKeeper.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.sql.DataSource
getDbConnectoinFactory()
getDbConnectoinFactoryEventIpcManager
getEventManager()
getEventManagerstatic PassiveStatusKeeper
getInstance()
getInstancePollStatus
getStatus(java.lang.String nodeLabel, java.lang.String ipAddr, java.lang.String svcName)
getStatusvoid
onEvent(IEvent e)
Process a sent event.protected void
onInit()
onInitprotected void
onStop()
onStopvoid
setDataSource(javax.sql.DataSource dataSource)
setDataSourcevoid
setEventManager(EventIpcManager eventMgr)
setEventManagerstatic void
setInstance(PassiveStatusKeeper psk)
setInstancevoid
setStatus(java.lang.String nodeLabel, java.lang.String ipAddr, java.lang.String svcName, PollStatus pollStatus)
setStatusvoid
setStatus(PassiveStatusKey key, PollStatus pollStatus)
setStatus-
Methods inherited from class org.opennms.netmgt.daemon.AbstractServiceDaemon
afterPropertiesSet, destroy, getName, getStatus, getStatusText, init, isPaused, isRunning, isStarting, onPause, onResume, onStart, pause, resume, setStatus, start, status, stop, waitForStatus, waitForStatus
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.opennms.netmgt.events.api.EventListener
getName
-
-
-
-
Constructor Detail
-
PassiveStatusKeeper
public PassiveStatusKeeper()
Constructor for PassiveStatusKeeper.
-
PassiveStatusKeeper
public PassiveStatusKeeper(EventIpcManager eventMgr)
Constructor for PassiveStatusKeeper.
- Parameters:
eventMgr
- aEventIpcManager
object.
-
-
Method Detail
-
setInstance
public static void setInstance(PassiveStatusKeeper psk)
setInstance
- Parameters:
psk
- aPassiveStatusKeeper
object.
-
getInstance
public static PassiveStatusKeeper getInstance()
getInstance
- Returns:
- a
PassiveStatusKeeper
object.
-
onInit
protected void onInit()
onInit
- Specified by:
onInit
in classAbstractServiceDaemon
-
onStop
protected void onStop()
onStop
- Overrides:
onStop
in classAbstractServiceDaemon
-
setStatus
public void setStatus(java.lang.String nodeLabel, java.lang.String ipAddr, java.lang.String svcName, PollStatus pollStatus)
setStatus
- Parameters:
nodeLabel
- aString
object.ipAddr
- aString
object.svcName
- aString
object.pollStatus
- aPollStatus
object.
-
setStatus
public void setStatus(PassiveStatusKey key, PollStatus pollStatus)
setStatus
- Parameters:
key
- aPassiveStatusKey
object.pollStatus
- aPollStatus
object.
-
getStatus
public PollStatus getStatus(java.lang.String nodeLabel, java.lang.String ipAddr, java.lang.String svcName)
getStatus
- Parameters:
nodeLabel
- aString
object.ipAddr
- aString
object.svcName
- aString
object.- Returns:
- a
PollStatus
object.
-
onEvent
public void onEvent(IEvent e)
Process a sent event.- Specified by:
onEvent
in interfaceEventListener
- Parameters:
e
- aIEvent
object.
-
getEventManager
public EventIpcManager getEventManager()
getEventManager
- Returns:
- a
EventIpcManager
object.
-
setEventManager
public void setEventManager(EventIpcManager eventMgr)
setEventManager
- Parameters:
eventMgr
- aEventIpcManager
object.
-
getDbConnectoinFactory
public javax.sql.DataSource getDbConnectoinFactory()
getDbConnectoinFactory
- Returns:
- a
DataSource
object.
-
setDataSource
public void setDataSource(javax.sql.DataSource dataSource)
setDataSource
- Parameters:
dataSource
- aDataSource
object.
-
-