logger.info("PingFailed:" + " agent=" + name + " newState=" + stateName(stateOnFail));
  protected void doPing(String name,                        final int stateOnSuccess,                        final int stateOnFail) {    long pingTimeout = getLongProperty(name, "PING_TIMEOUT", PING_TIMEOUT);    pingHelper.ping(name, pingTimeout, new PingListener() {      public void pingComplete(String name, int status) {        logger.debug("Ping:" +                     " agent=" + name +                     " state=" + stateName(model.getCurrentState(name)) +                     " result=" + (status == PingHelper.SUCCESS ? "SUCCESS" : "FAIL"));        if (status == PingHelper.SUCCESS) {          newState(name, stateOnSuccess);        } else {          newState(name, stateOnFail);          logger.info("PingFailed:" +                       " agent=" + name +                       " newState=" + stateName(stateOnFail));        }      }    });  }