if (body == null) {
throw new IOException("Response entity was null and a response was expected");
}
// time to parse the body
MonitorResponse monitorResponse = ProtocolFactory.parseMonitorResponse(body);
// update areaId first - this should really only happen the first time
remoteBroker.setAreaId(monitorResponse.getAreaId());
// update version - this should really only happen the first time
remoteBroker.setVersion(monitorResponse.getVersion());
// process the queues included with the result...
for (Map.Entry<String,Integer> entry : monitorResponse.getQueues().entrySet()) {
logger.debug("Received update for queueName=" + entry.getKey() + " with weight=" + entry.getValue());
state.updateRemoteQueueWeight(entry.getKey(), remoteBroker.getUrl(), entry.getValue());
}
// assume its ok