|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.notifd.BroadcastEventProcessor
Field Summary | |
private java.util.Map |
m_noticeQueues
|
private Notifd |
m_notifd
|
private static java.lang.String |
NOTIFD_EXPANSION_PARM
A regular expression for matching an expansion parameter delimited by percent signs. |
private static org.apache.regexp.RE |
notifdExpandRE
|
Constructor Summary | |
(package private) |
BroadcastEventProcessor(Notifd notifd,
java.util.Map noticeQueues)
This constructor is called to initilize the event receiver. |
Method Summary | |
private boolean |
autoAckExistsForEvent(java.lang.String eventUei)
Returns true if an auto acknowledgment exists for the specificed event, such that the arrival of some second, different event will auto acknowledge the event passed as an argument. |
private void |
automaticAcknowledge(Event event)
|
(package private) java.util.Map |
buildParameterMap(Notification notification,
Event event,
int noticeId)
|
void |
close()
Unsubscribe from eventd |
private boolean |
continueWithNotice(Event event)
This method determines if the notice should continue based on the status of the notify |
static java.lang.String |
expandNotifParms(java.lang.String inp,
java.util.Map paramMap)
A parameter expansion algorithm, designed to replace strings delimited by percent signs '%' with a value supplied by a Map object. |
private NotifdConfigManager |
getConfigManager()
|
private EventIpcManager |
getEventManager()
|
java.lang.String |
getName()
Return an id for this event listener |
private NotificationManager |
getNotificationManager()
|
private int |
getUserCount(Target[] targets,
Escalate[] escalations)
Detemines the number of users assigned to a list of Target and Escalate lists. |
private int |
getUsersInTarget(Target target)
|
private NotificationTask |
makeEmailTask(long sendTime,
java.util.Map parameters,
int noticeId,
java.lang.String address,
java.lang.String[] commandList,
java.util.List siblings)
|
private NotificationTask |
makeUserTask(long sendTime,
java.util.Map parameters,
int noticeId,
java.lang.String targetName,
java.lang.String[] commandList,
java.util.List siblings)
|
void |
onEvent(Event event)
This method is invoked by the EventIpcManager when a new event is available for processing. |
private void |
processEscalations(Escalate[] escalations,
java.util.List targetSiblings,
NoticeQueue noticeQueue,
long startTime,
java.util.Map params,
int noticeId)
|
private void |
processTargets(Target[] targets,
java.util.List targetSiblings,
NoticeQueue noticeQueue,
long startTime,
java.util.Map params,
int noticeId)
|
java.util.Map |
rebuildParameterMap(int notifId,
java.lang.String resolutionPrefix)
|
java.lang.String |
scheduledOutage(long nodeId,
java.lang.String theInterface)
Checks the package information for the pollable service and determines if any of the calendar outages associated with the package apply to the current time and the service's interface. |
private void |
scheduleNoticesForEvent(Event event)
|
private void |
sendNotifEvent(java.lang.String uei,
java.lang.String logMessage,
java.lang.String description)
Sends and event related to a notification |
private void |
sendResolvedNotifications(java.util.Collection notifIDs,
Event event,
java.lang.String acknowledge,
java.lang.String[] match,
java.lang.String resolutionPrefix)
|
protected void |
sendResolvedNotificationsToUser(java.lang.String queueID,
java.lang.String targetName,
java.lang.String[] commands,
java.util.Map params)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Map m_noticeQueues
private static final java.lang.String NOTIFD_EXPANSION_PARM
private static org.apache.regexp.RE notifdExpandRE
private Notifd m_notifd
Constructor Detail |
BroadcastEventProcessor(Notifd notifd, java.util.Map noticeQueues)
Method Detail |
public void close()
private EventIpcManager getEventManager()
public void onEvent(Event event)
onEvent
in interface EventListener
event
- The event .private void automaticAcknowledge(Event event)
private void sendResolvedNotifications(java.util.Collection notifIDs, Event event, java.lang.String acknowledge, java.lang.String[] match, java.lang.String resolutionPrefix) throws java.lang.Exception
java.lang.Exception
protected void sendResolvedNotificationsToUser(java.lang.String queueID, java.lang.String targetName, java.lang.String[] commands, java.util.Map params) throws java.lang.Exception
java.lang.Exception
private NotificationManager getNotificationManager()
private NotifdConfigManager getConfigManager()
private boolean continueWithNotice(Event event)
private boolean autoAckExistsForEvent(java.lang.String eventUei)
private void scheduleNoticesForEvent(Event event)
private int getUserCount(Target[] targets, Escalate[] escalations) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
targets
- the list of Target objectsescalations
- the list of Escalate objects
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
private int getUsersInTarget(Target target) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
private void sendNotifEvent(java.lang.String uei, java.lang.String logMessage, java.lang.String description)
uei
- the UEI for the eventjava.util.Map buildParameterMap(Notification notification, Event event, int noticeId)
public static java.lang.String expandNotifParms(java.lang.String inp, java.util.Map paramMap)
inp
- the input stringparamMap
- a map that will supply the substitution valuesprivate void processTargets(Target[] targets, java.util.List targetSiblings, NoticeQueue noticeQueue, long startTime, java.util.Map params, int noticeId) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
private void processEscalations(Escalate[] escalations, java.util.List targetSiblings, NoticeQueue noticeQueue, long startTime, java.util.Map params, int noticeId) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
private NotificationTask makeUserTask(long sendTime, java.util.Map parameters, int noticeId, java.lang.String targetName, java.lang.String[] commandList, java.util.List siblings) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
private NotificationTask makeEmailTask(long sendTime, java.util.Map parameters, int noticeId, java.lang.String address, java.lang.String[] commandList, java.util.List siblings) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public java.lang.String getName()
getName
in interface EventListener
public java.util.Map rebuildParameterMap(int notifId, java.lang.String resolutionPrefix) throws java.lang.Exception
java.lang.Exception
public java.lang.String scheduledOutage(long nodeId, java.lang.String theInterface)
java.io.IOException
org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |