use of org.apache.activemq.artemis.core.management.impl.view.QueueView in project activemq-artemis by apache.
the class ActiveMQServerControlImpl method listQueues.
@Override
public String listQueues(String options, int page, int pageSize) throws Exception {
checkStarted();
clearIO();
try {
List<QueueControl> queues = new ArrayList<>();
Object[] qs = server.getManagementService().getResources(QueueControl.class);
for (int i = 0; i < qs.length; i++) {
queues.add((QueueControl) qs[i]);
}
QueueView view = new QueueView(server);
view.setCollection(queues);
view.setOptions(options);
return view.getResultsAsJson(page, pageSize);
} finally {
blockOnIO();
}
}
Aggregations