| |
|
| java.lang.Object org.cougaar.lib.aggagent.client.Monitor org.cougaar.lib.aggagent.client.ResultSetMonitor
ResultSetMonitor | public class ResultSetMonitor extends Monitor (Code) | | Provides support for event driven monitoring of active
AggregationResultSet(s) on the aggregation agent.
Maintains a collection of monitored result sets 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 result sets or
- add update listener(s) to 'live' result sets provided by monitor and
receive events only for those objects
|
Constructor Summary | |
public | ResultSetMonitor(String serverURL, int updateMethod) Create a new monitor to monitor a set of objects on the aggregation
agent. |
Method Summary | |
protected String | createIdTag(Object identifier) Provides a xml representation of a given query identifier.
Parameters: identifier - an object that uniquely identifies an object on theaggregation agent. | public AggregationResultSet | monitorResultSet(String queryId) Monitor a result set managed by the aggregation agent. | protected Object | remove(Element monitoredElement) Called when a remove event is reported by the aggregation agent to a
result set described by the given xml element tree.
Parameters: monitoredElement - xml element tree that describes the removedresult set. | public AggregationResultSet | stopMonitoringResultSet(String queryId) Remove this result set from the set of result sets being monitored.
This method has a negligible effect if monitor-all is turned on
(old live result set object will die, but new one will take it's place
if that object is still on the log plan).
Parameters: queryId - id of query result adapter on aggregation agent that ismaintaining this result set. | protected Object | update(Element monitoredElement) Called when a update event (either add or change) is reported by the
aggregation agent to a result set described by the given xml element
tree.
Parameters: monitoredElement - xml element tree that describes the updatedresult set. |
ResultSetMonitor | public ResultSetMonitor(String serverURL, int updateMethod)(Code) | | Create a new monitor to monitor a set of objects on the aggregation
agent. Each monitor is used to monitor a single type of object
(e.g. AlertMonitor, ResultSetMonitor).
Parameters: serverURL - aggregation agent cluster's text URL Parameters: updateMethod - method used to keep monitored objects updatedPULL_METHOD - periodically pull incremental updatesfrom passive session on aggregationagent. Create new connection witheach pull.KEEP_ALIVE_METHOD - create keep alive sessionwith aggregation agent. Incrementalupdates are pushed to the clientover this pipe. |
createIdTag | protected String createIdTag(Object identifier)(Code) | | Provides a xml representation of a given query identifier.
Parameters: identifier - an object that uniquely identifies an object on theaggregation agent. Must be able to use this objectas a hashtable key (i.e. must have proper equals()and hashcode() methods). a xml representation of given query identifier. |
monitorResultSet | public AggregationResultSet monitorResultSet(String queryId)(Code) | | Monitor a result set managed by the aggregation agent. Returns a 'live'
result set 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 result set is added to this
monitor's set of monitored objects.
Parameters: queryId - id of query result adapter on aggregation agent that ismaintaining this result set. a live result set that is actively being updated to match asubject object on the aggregation agent. |
remove | protected Object remove(Element monitoredElement)(Code) | | Called when a remove event is reported by the aggregation agent to a
result set described by the given xml element tree.
Parameters: monitoredElement - xml element tree that describes the removedresult set. previously live result set that was removed. |
stopMonitoringResultSet | public AggregationResultSet stopMonitoringResultSet(String queryId)(Code) | | Remove this result set from the set of result sets being monitored.
This method has a negligible effect if monitor-all is turned on
(old live result set object will die, but new one will take it's place
if that object is still on the log plan).
Parameters: queryId - id of query result adapter on aggregation agent that ismaintaining this result set. previously live result set 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 a result set described by the given xml element
tree.
Parameters: monitoredElement - xml element tree that describes the updatedresult set. a live result set object 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)
|
|
|
|