public void state(PrintStream out,String agentContainerId){
  JSONObject stateInfo;
  if (StringUtils.isEmpty(agentContainerId)) {
    stateInfo=getClusterStateInfo();
  }
 else {
    stateInfo=getAgentStateInfo(agentContainerId);
  }
  if (stateInfo != null) {
    out.println(stateInfo.toString(2));
  }
 else {
    throw new MinimesosException("Did not find the cluster or requested container");
  }
}

public void state ( PrintStream out , String agentContainerId ) { JSONObject stateInfo ; if ( StringUtils . isEmpty ( agentContainerId ) ) { stateInfo = getClusterStateInfo ( ) ; } else { stateInfo = getAgentStateInfo ( agentContainerId ) ; } if ( stateInfo != null ) { out . println ( stateInfo . toString ( 2 ) ) ; } else { throw new MinimesosException ( "Did not find the cluster or requested container" ) ; } }
prints the state of the mesos master or agent
