clearIO();
try
{
Collection<Consumer> consumers = queue.getConsumers();
JSONArray jsonArray = new JSONArray();
for (Consumer consumer : consumers)
{
if (consumer instanceof ServerConsumer)
{
ServerConsumer serverConsumer = (ServerConsumer)consumer;
JSONObject obj = new JSONObject();
obj.put("consumerID", serverConsumer.getID());
obj.put("connectionID", serverConsumer.getConnectionID().toString());
obj.put("sessionID", serverConsumer.getSessionID());
obj.put("browseOnly", serverConsumer.isBrowseOnly());
obj.put("creationTime", serverConsumer.getCreationTime());
jsonArray.put(obj);
}
}
return jsonArray.toString();
}
finally
{
blockOnIO();
}