|
OpenNMS API 1.1.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 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(java.util.Map noticeQueues)
This constructor is called to initilize the event receiver. |
Method Summary | |
private void |
automaticAcknowledge(Event event)
|
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. |
java.lang.String |
getName()
Return an id for this event listener |
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)
|
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 |
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
Constructor Detail |
BroadcastEventProcessor(java.util.Map noticeQueues)
Method Detail |
public void close()
public void onEvent(Event event)
onEvent
in interface EventListener
event
- The event .private void automaticAcknowledge(Event event)
private boolean continueWithNotice(Event event)
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 eventprivate java.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
|
OpenNMS API 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |