public void ping(final String agentName, final long timeout, final PingListener pl) { if (agentId.toString().equals(agentName)) { pl.pingComplete(agentName, SUCCESS, 0l); } else { queuePing(new QueueEntry(MessageAddress.getMessageAddress(agentName), timeout, pl));
public void ping(String[] agentNames, final long timeout, final PingListener pl) { if (logger.isDebugEnabled()) { Set agentsToPing = new HashSet(); for (int i = 0; i < agentNames.length; i++) agentsToPing.add(agentNames[i]); logger.debug("ping: agents=" + agentsToPing + " timeout=" + timeout);
  public void ping(final String agentName, final long timeout, final PingListener pl) {    if (agentId.toString().equals(agentName)) {      pl.pingComplete(agentName, SUCCESS, 0l);  // Can't ping self, return SUCCESS    } else {      queuePing(new QueueEntry(MessageAddress.getMessageAddress(agentName),                               timeout, pl));    }  }