| |
|
| java.lang.Object org.cougaar.lib.aggagent.client.Monitor org.cougaar.lib.aggagent.client.AlertMonitor
AlertMonitor | public class AlertMonitor extends Monitor (Code) | | Provides support for event driven monitoring of active Alert(s) on the
aggregation agent.
Maintains a collection of monitored alerts and keeps them updated
based on changes on the aggregation agent's blackboard. To react to these
changes either:
- add update listener(s) to this monitor class and receive events for
changes to all monitored alerts or
- add update listener(s) to 'live' alerts provided by this monitor and
receive events only for those objects
|
Method Summary | |
protected String | createIdTag(Object identifier) Provides a xml representation of a given alert identifier.
Parameters: identifier - an object that uniquely identifies an alert on theaggregation agent. | public boolean | isMonitoring(String queryId, String alertName) Returns true if an alert matching the given identifiers is currently
being updated by this monitor. | public AlertDescriptor | monitorAlert(String queryId, String alertName) Monitor an alert managed by the aggregation agent. | protected Object | remove(Element monitoredElement) Called when a remove event is reported by the aggregation agent to an
alert described by the given xml element tree.
Parameters: monitoredElement - xml element tree that describes the removedalert. | public AlertDescriptor | stopMonitoringAlert(String queryId, String alertName) Remove this alert from the set of alerts being monitored. | protected Object | update(Element monitoredElement) Called when a update event (either add or change) is reported by the
aggregation agent to an alert described by the given xml element
tree.
Parameters: monitoredElement - xml element tree that describes the updatedalert. |
AlertMonitor | public AlertMonitor(String serverURL, int updateMethod)(Code) | | |
createIdTag | protected String createIdTag(Object identifier)(Code) | | Provides a xml representation of a given alert identifier.
Parameters: identifier - an object that uniquely identifies an alert on theaggregation agent. a xml representation of given alert identifier. |
isMonitoring | public boolean isMonitoring(String queryId, String alertName)(Code) | | Returns true if an alert matching the given identifiers is currently
being updated by this monitor.
Parameters: queryId - id of query result adapter on aggregation agent that ismaintaining this alert. Parameters: alertName - name of alert to monitor true if an alert matching the given identifiers is currentlybeing updated by this monitor. |
monitorAlert | public AlertDescriptor monitorAlert(String queryId, String alertName)(Code) | | Monitor an alert managed by the aggregation agent. Returns a 'live'
alert descriptor for a given persistent query. Update listeners can be
added to this live object to react to changes to that object. If
monitor is not set to monitor-all-objects, this alert is added to
this monitor's set of monitored objects.
Parameters: queryId - id of query result adapter on aggregation agent that ismaintaining this alert. Parameters: alertName - name of alert to monitor a live alert descriptor that is actively being updated to matcha subject alert on the aggregation agent. |
remove | protected Object remove(Element monitoredElement)(Code) | | Called when a remove event is reported by the aggregation agent to an
alert described by the given xml element tree.
Parameters: monitoredElement - xml element tree that describes the removedalert. previously live alert descriptor that was removed. |
stopMonitoringAlert | public AlertDescriptor stopMonitoringAlert(String queryId, String alertName)(Code) | | Remove this alert from the set of alerts being monitored.
This method has a negligible effect if monitor-all is turned on
(old live alert object will die, but new one will take it's place
if that alert is still on the log plan).
Parameters: queryId - id of query result adapter on aggregation agent that ismaintaining this alert. Parameters: alertName - name of alert to monitor previously live alert descriptor that was removed. |
update | protected Object update(Element monitoredElement)(Code) | | Called when a update event (either add or change) is reported by the
aggregation agent to an alert described by the given xml element
tree.
Parameters: monitoredElement - xml element tree that describes the updatedalert. a live alert descriptor updated based on the given xml |
Fields inherited from org.cougaar.lib.aggagent.client.Monitor | final public static int KEEP_ALIVE_METHOD(Code)(Java Doc) final public static int PULL_METHOD(Code)(Java Doc)
|
|
|
|