Execute works on getAddedCollection but not getChangedCollection
Ray Tomlinson
RTomlinson at bbn.com
Thu Apr 12 13:40:16 EDT 2007
James Livingood wrote:
> Hello all,
>
> I’ve subscribed to the object I want:
>
> HypothesisSub = (IncrementalSubscription)
> getBlackboardService().subscribe(HYPOTHESIS_PRED);
>
> And in my execute() I have:
>
> for (Iterator i = HypothesisSub.getAddedCollection().iterator();
> i.hasNext();) {
>
> // grabs all the information and puts it into MS SQL.
>
> }
>
> for (Iterator i = HypothesisSub.getChangedCollection().iterator();
> i.hasNext();) {
>
> // grab all the data AGAIN and put it into MS SQL
>
> }
>
> Why does the getAddedCollection run when the plugin is first started up
>
The addedCollection contains all newly added objects (added with
publishAdd) including ones that were already present when you first
subscribe.
>
> , but the getChangedCollection does not run when objects that I've
> subscribed to change/new ones are added/etc?
>
The changedCollection contains newly changed objects (with
publishChange). The "add" and "change" refers to how the object is
published not to the overall status of the subscription.
--
Ray Tomlinson
BBN Technologies
10 Moulton St.
Cambridge, MA 02138
(617) 873-3363
More information about the Cougaar-developers
mailing list