protected void doPing(String name,
protected void doPing(String agent,
  protected void doPing(String name,                        final int stateOnSuccess,                        final int stateOnFail) {    final long pingTimeout = calcPingTimeout(name);    //logger.debug("doPing: agent=" + name + " timeout=" + pingTimeout);    getPingHelper().ping(name, pingTimeout, new PingListener() {      public void pingComplete(String name, int status, long time) {        if (status == PingHelper.SUCCESS) {          newState(name, stateOnSuccess);          if (!isLocal(name)) {            pingStats.enter(time);            if (pingStats.getCount() == 10 || pingStats.getCount()%25 == 0) {              setPingTimeout();            }          }        } else {          logger.info("Ping:" +                       " agent=" + name +                       " state=" + stateName(model.getCurrentState(name)) +                       " timeout=" + pingTimeout +                       " actual=" + time +                       " result=" + (status == PingHelper.SUCCESS ? "SUCCESS" : "FAIL") +                       (status == PingHelper.SUCCESS ? "" : " newState=" + stateName(stateOnFail)));          newState(name, stateOnFail);        }      }    });  }