A
ChangeReport to change the targets of a relay.
This ChangeReport must be used used when publishing changes to the
target set of a Relay (as opposed to the relay's content).
Failure to do so will cause dangling relay targets in agents that
are no longer in the target set.
Usage is:
Collection changes = Collections.singleton(new RelayChangeReport(relay));
relay.setTargets(newTargets);
blackboard.publishChange(relay, changes);
The details of how you change the targets of your relay
implementation are, of course, your responsibility, but whatever
method you use, it is critical that the RelayChangeReport be
created before you change the targets since the change report
carries a copy of the old set to the RelayLP which uses it to
insure that the old targets are correctly reconciled with the new
targets.
|