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 Object implements SpringServiceDaemon, org.springframework.beans.factory.DisposableBean
Acknowledgment management Daemon- Author:
- David Hustace, Jeff Gehlbach
-
-
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 List<AckReader>
getAckReaders()
getAckReadersAckdConfigurationDao
getConfigDao()
getConfigDaoEventForwarder
getEventForwarder()
getEventForwarderScheduledThreadPoolExecutor
getExecutor()
getExecutorString
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(List<AckReader> ackReaders)
setAckReadersvoid
setConfigDao(AckdConfigurationDao config)
setConfigDaovoid
setEventForwarder(EventForwarder eventForwarder)
setEventForwardervoid
setExecutor(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 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(ScheduledThreadPoolExecutor executor)
setExecutor
- Parameters:
executor
- aScheduledThreadPoolExecutor
object.
-
getExecutor
public 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.
-
setAckReaders
public void setAckReaders(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 Exception
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
- if any.
-
-