@Override
protected boolean execute() throws Exception {
BeesClient client = getBeesClient(BeesClient.class);
ServerInfo serverInfo = client.serverInfo(getParameterID());
if (isTextOutput()) {
System.out.println("Server ID : " + serverInfo.getId());
System.out.println("size : " + serverInfo.getSize());
System.out.println("state : " + serverInfo.getState());
System.out.println("pool ID : " + serverInfo.getPoolId());
Map<String, String> params = serverInfo.getParameters();
if (params != null) {
for (Map.Entry<String, String> entry : params.entrySet()) {
System.out.println(Helper.getPaddedString(entry.getKey(), 11) + ": " + entry.getValue());
}
}
if (serverInfo.getApplicationIDs() != null) {
System.out.println("applications:");
for (String appId : serverInfo.getApplicationIDs()) {
System.out.println(" " + appId);
}
}
} else printOutput(serverInfo, ServerInfo.class);