WOResponse[] responses = sendQueryToWotaskds("INSTANCE", hostArray);
NSMutableArray errorArray = new NSMutableArray();
NSArray responseArray = null;
NSDictionary responseDictionary = null;
NSDictionary queryResponseDictionary = null;
for (int i = 0; i < responses.length; i++) {
if ((responses[i] == null) || (responses[i].content() == null)) {
responseDictionary = emptyResponse;
} else {
try {
responseDictionary = (NSDictionary) new _JavaMonitorDecoder().decodeRootObject(responses[i]
.content());
} catch (WOXMLException wxe) {
NSLog.err.appendln("MonitorComponent pageWithName(AppDetailPage) Error decoding response: "
+ responses[i].contentString());
responseDictionary = responseParsingFailed;
}
}
getGlobalErrorFromResponse(responseDictionary, errorArray);
queryResponseDictionary = (NSDictionary) responseDictionary.valueForKey("queryWotaskdResponse");
if (queryResponseDictionary != null) {
responseArray = (NSArray) queryResponseDictionary.valueForKey("instanceResponse");
if (responseArray != null) {
for (int j = 0; j < responseArray.count(); j++) {
responseDictionary = (NSDictionary) responseArray.objectAtIndex(j);
String host = (String) responseDictionary.valueForKey("host");
Integer port = (Integer) responseDictionary.valueForKey("port");
String runningState = (String) responseDictionary.valueForKey("runningState");
Boolean refusingNewSessions = (Boolean) responseDictionary
.valueForKey("refusingNewSessions");
NSDictionary statistics = (NSDictionary) responseDictionary.valueForKey("statistics");
NSArray deaths = (NSArray) responseDictionary.valueForKey("deaths");
String nextShutdown = (String) responseDictionary.valueForKey("nextShutdown");
MInstance anInstance = siteConfig().instanceWithHostnameAndPort(host, port);
if (anInstance != null) {