com.isti.quakewatch.alert
Class AlertMsgProcessor

java.lang.Object
  extended by com.isti.quakewatch.alert.AlertMsgProcessor
All Implemented Interfaces:
QWMsgObjsListener

public class AlertMsgProcessor
extends java.lang.Object
implements QWMsgObjsListener

Class AlertMsgProcessor processes received events, checking if they should trigger an alert.


Constructor Summary
AlertMsgProcessor(LogFile logObj, java.util.List alertRecipientsListObj)
          Creates the event-message processor object.
 
Method Summary
 void newDelEventMsgRecord(QWDelEventMsgRecord delEventRecObj, QWEventMsgRecord evtRecObj)
          Called when a new 'QWDelEventMsgRecord' object has been created in response to an XML message.
 void newDelProductMsgRecord(QWDelProductMsgRecord delProductRecObj, QWEventMsgRecord evtRecObj)
          Called when a new 'QWDelProductMsgRecord' object has been created in response to an XML message.
 void newEventMsgRecord(QWEventMsgRecord eventRecObj)
          Called when a new 'QWEventMsgRecord' object has been created in response to an XML message.
 void newProductMsgRecord(QWProductMsgRecord prodRecObj, QWEventMsgRecord evtRecObj)
          Called when a new 'QWProductMsgRecord' object has been created in response to an XML message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlertMsgProcessor

public AlertMsgProcessor(LogFile logObj,
                         java.util.List alertRecipientsListObj)
Creates the event-message processor object.

Parameters:
logObj - the 'LogFile' object.
alertRecipientsListObj - the list of 'AlertRecipient' objects or null if none.
Method Detail

newEventMsgRecord

public void newEventMsgRecord(QWEventMsgRecord eventRecObj)
Called when a new 'QWEventMsgRecord' object has been created in response to an XML message. The event-message record is given to each alert recipient for processing.

Specified by:
newEventMsgRecord in interface QWMsgObjsListener
Parameters:
eventRecObj - event record object.

newDelEventMsgRecord

public void newDelEventMsgRecord(QWDelEventMsgRecord delEventRecObj,
                                 QWEventMsgRecord evtRecObj)
Called when a new 'QWDelEventMsgRecord' object has been created in response to an XML message. The delete-event-message record is given to each alert recipient on its list of recipients that have received an alert message about the event.

Specified by:
newDelEventMsgRecord in interface QWMsgObjsListener
Parameters:
delEventRecObj - delete event record object.
evtRecObj - event record object.

newProductMsgRecord

public void newProductMsgRecord(QWProductMsgRecord prodRecObj,
                                QWEventMsgRecord evtRecObj)
Called when a new 'QWProductMsgRecord' object has been created in response to an XML message.

Specified by:
newProductMsgRecord in interface QWMsgObjsListener
Parameters:
prodRecObj - product record object.
evtRecObj - event record object.

newDelProductMsgRecord

public void newDelProductMsgRecord(QWDelProductMsgRecord delProductRecObj,
                                   QWEventMsgRecord evtRecObj)
Called when a new 'QWDelProductMsgRecord' object has been created in response to an XML message.

Specified by:
newDelProductMsgRecord in interface QWMsgObjsListener
Parameters:
delProductRecObj - delete product record object.
evtRecObj - event record object.