Package org.opennms.netmgt.ackd
Class Ackd
- java.lang.Object
-
- org.opennms.netmgt.ackd.Ackd
-
- All Implemented Interfaces:
SpringServiceDaemon
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
public class Ackd extends java.lang.Object implements SpringServiceDaemon, org.springframework.beans.factory.DisposableBean
Acknowledgment management Daemon- Author:
- David Hustace, Jeff Gehlbach
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAME
ConstantNAME="Ackd"
-
Constructor Summary
Constructors Constructor Description Ackd()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
afterPropertiesSet()
afterPropertiesSetvoid
destroy()
destroyAcknowledgmentDao
getAcknowledgmentDao()
protected java.util.List<AckReader>
getAckReaders()
getAckReadersAckdConfigurationDao
getConfigDao()
getConfigDaoEventForwarder
getEventForwarder()
getEventForwarderjava.util.concurrent.ScheduledThreadPoolExecutor
getExecutor()
getExecutorjava.lang.String
getName()
getNamevoid
handleAckEvent(IEvent event)
Handles the event driven access to acknowledgingOnmsAcknowledgable
s.void
handleReloadConfigEvent(IEvent event)
handleReloadConfigEventprotected void
pauseReaders()
pauseReadersprotected void
restartReaders(boolean reloadConfigs)
restartReadersprotected void
resumeReaders()
resumeReadersvoid
setAcknowledgmentDao(AcknowledgmentDao ackDao)
void
setAckReaders(java.util.List<AckReader> ackReaders)
setAckReadersvoid
setConfigDao(AckdConfigurationDao config)
setConfigDaovoid
setEventForwarder(EventForwarder eventForwarder)
setEventForwardervoid
setExecutor(java.util.concurrent.ScheduledThreadPoolExecutor executor)
setExecutorvoid
start()
startprotected void
startReaders()
Starts the AckReaders without indicating a reload of their configuration is necessary.protected void
startReaders(boolean reloadConfig)
Starts the AckReaders indicating a reload of their configuration is necessary.protected void
stopReaders()
stopReaders
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
ConstantNAME="Ackd"
- See Also:
- Constant Field Values
-
-
Method Detail
-
start
public void start()
start
- Specified by:
start
in interfaceSpringServiceDaemon
-
destroy
public void destroy()
destroy
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
startReaders
protected void startReaders()
Starts the AckReaders without indicating a reload of their configuration is necessary.
-
startReaders
protected void startReaders(boolean reloadConfig)
Starts the AckReaders indicating a reload of their configuration is necessary.- Parameters:
reloadConfig
- a boolean.
-
stopReaders
protected void stopReaders()
stopReaders
-
pauseReaders
protected void pauseReaders()
pauseReaders
-
resumeReaders
protected void resumeReaders()
resumeReaders
-
restartReaders
protected void restartReaders(boolean reloadConfigs)
restartReaders
- Parameters:
reloadConfigs
- a boolean.
-
handleAckEvent
public void handleAckEvent(IEvent event)
Handles the event driven access to acknowledgingOnmsAcknowledgable
s. The acknowledgment event contains 4 parameters: ackUser: The user acknowledging theOnmsAcknowledgable
ackAction: ack, unack, esc, clear ackType:AckTypeOnmsAlarm
,OnmsNotification
, etc. refId: The ID of theOnmsAcknowledgable
- Parameters:
event
- aIEvent
object.
-
handleReloadConfigEvent
public void handleReloadConfigEvent(IEvent event)
handleReloadConfigEvent
- Parameters:
event
- aIEvent
object.
-
setExecutor
public void setExecutor(java.util.concurrent.ScheduledThreadPoolExecutor executor)
setExecutor
- Parameters:
executor
- aScheduledThreadPoolExecutor
object.
-
getExecutor
public java.util.concurrent.ScheduledThreadPoolExecutor getExecutor()
getExecutor
- Returns:
- a
ScheduledThreadPoolExecutor
object.
-
getEventForwarder
public EventForwarder getEventForwarder()
getEventForwarder
- Returns:
- a
EventForwarder
object.
-
setEventForwarder
public void setEventForwarder(EventForwarder eventForwarder)
setEventForwarder
- Parameters:
eventForwarder
- aEventForwarder
object.
-
getAckReaders
protected java.util.List<AckReader> getAckReaders()
getAckReaders
- Returns:
- a
List
object.
-
setAckReaders
public void setAckReaders(java.util.List<AckReader> ackReaders)
setAckReaders
- Parameters:
ackReaders
- aList
object.
-
getAcknowledgmentDao
public AcknowledgmentDao getAcknowledgmentDao()
- Returns:
- a
AcknowledgmentDao
object.
-
setAcknowledgmentDao
public void setAcknowledgmentDao(AcknowledgmentDao ackDao)
- Parameters:
ackDao
- aAcknowledgmentDao
object.
-
getConfigDao
public AckdConfigurationDao getConfigDao()
getConfigDao
- Returns:
- a
AckdConfigurationDao
object.
-
setConfigDao
public void setConfigDao(AckdConfigurationDao config)
setConfigDao
- Parameters:
config
- aAckdConfigurationDao
object.
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
java.lang.Exception
- if any.
-
getName
public java.lang.String getName()
getName
- Returns:
- a
String
object.
-
-