UnaryPredicate queryPred = new UnaryPredicate() { public boolean execute(Object o) { if (o instanceof QueryRequest) { QueryRequest ir = (QueryRequest) o; MessageAddress dest = ir.getSourceCluster(); return RestartLogicProviderHelper.matchesRestart( self, cid, dest); } return false; } }; Enumeration queryEnum = rootplan.searchBlackboard(queryPred); while (queryEnum.hasMoreElements()) { QueryRequest ir = (QueryRequest) queryEnum.nextElement(); processQueryRequestAdded(ir); } }
  public void restart(final MessageAddress cid) {    UnaryPredicate pred = new UnaryPredicate() {      public boolean execute(Object o) {        if (o instanceof DetailRequest) {          DetailRequest ir = (DetailRequest) o;          MessageAddress dest = ir.getSourceCluster();          return             RestartLogicProviderHelper.matchesRestart(                self, cid, dest);        }        return false;      }    };    Enumeration enum = rootplan.searchBlackboard(pred);    while (enum.hasMoreElements()) {      DetailRequest ir = (DetailRequest) enum.nextElement();      processDetailRequestAdded(ir);    }