logger.debug("PingAgent:" + " agent=" + pr.getTarget().toString() + " status=FAIL"); ((PingListener)pingsInProcess.get(pr.getUID())). pingComplete(pr.getTarget().toString(), FAIL, pr.getRoundTripTime()); pingsInProcess.remove(pr.getUID());
pingComplete(pr.getUID(), pr.getTarget(), PingResult.FAIL, pr.getRoundTripTime());
  public void execute() {    sendPings();    // Get PingRequests    for (Iterator it = pingRequests.getChangedCollection().iterator(); it.hasNext();) {      PingRequest pr = (PingRequest) it.next();      int status = pr.getStatus();      switch (status) {        case PingRequest.RECEIVED:          logger.debug("PingAgent:" +                      " agent=" + pr.getTarget().toString() +                      " status=SUCCESS");          ((PingListener)pingsInProcess.remove(pr.getUID())).              pingComplete(pr.getTarget().toString(), SUCCESS, pr.getRoundTripTime());          blackboard.publishRemove(pr);          pingsInProcess.remove(pr.getUID());          break;        case PingRequest.FAILED:          logger.debug("PingAgent:" +                      " agent=" + pr.getTarget().toString() +                      " status=FAIL");          ((PingListener)pingsInProcess.get(pr.getUID())).              pingComplete(pr.getTarget().toString(), FAIL, pr.getRoundTripTime());          pingsInProcess.remove(pr.getUID());          break;      }    }  }