public boolean isMyRelay(SimpleRelay relay) { // unpack content from relay Object relayContents = relay.getQuery(); if (relayContents instanceof UniqueObject) { return match(OneWay.EventType.RECEIVE, (UniqueObject) relayContents); } else { return false; } }
@Cougaar.Execute(on = Subscribe.ModType.ADD, when = "isMyRelay") public void executeNewObjectToSend(SimpleRelay relay) { Object object = relay.getQuery(); blackboard.publishAdd(object); blackboard.publishRemove(relay); }