コード例 #1
0
 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;
   }
 }
コード例 #2
0
 @Cougaar.Execute(on = Subscribe.ModType.ADD, when = "isMyRelay")
 public void executeNewObjectToSend(SimpleRelay relay) {
   Object object = relay.getQuery();
   blackboard.publishAdd(object);
   blackboard.publishRemove(relay);
 }