use of org.apache.activemq.artemis.core.management.impl.view.ConsumerView in project activemq-artemis by apache.
the class ActiveMQServerControlImpl method listConsumers.
@Override
public String listConsumers(String options, int page, int pageSize) throws Exception {
checkStarted();
clearIO();
try {
Set<ServerConsumer> consumers = new HashSet();
for (ServerSession session : server.getSessions()) {
consumers.addAll(session.getServerConsumers());
}
ConsumerView view = new ConsumerView(server);
view.setCollection(consumers);
view.setOptions(options);
return view.getResultsAsJson(page, pageSize);
} finally {
blockOnIO();
}
}
Aggregations