@Override public ObjectName[] getTopics() { return safeGetBroker().getTopicsNonSuppressed(); }
@Override public ObjectName[] getTopicSubscribers() { return safeGetBroker().getTopicSubscribersNonSuppressed(); }
@Override public ObjectName[] getDurableTopicSubscribers() { return safeGetBroker().getDurableTopicSubscribersNonSuppressed(); }
@Override public ObjectName[] getQueueSubscribers() { return safeGetBroker().getQueueSubscribersNonSuppressed(); }
@Override public ObjectName[] getTopicProducers() { return safeGetBroker().getTopicProducersNonSuppressed(); }
@Override public ObjectName[] getQueueProducers() { return safeGetBroker().getQueueProducersNonSuppressed(); }
@Override public ObjectName[] getQueues() { return safeGetBroker().getQueuesNonSuppressed(); }
@Override public ObjectName[] getTemporaryTopicSubscribers() { return safeGetBroker().getTemporaryTopicSubscribersNonSuppressed(); }
@Override public ObjectName[] getTemporaryQueueSubscribers() { return safeGetBroker().getTemporaryQueueSubscribersNonSuppressed(); }
@Override public String getBrokerId() { return safeGetBroker().getBrokerId().toString(); }
@Override public void addTopic(String name) throws Exception { safeGetBroker().getContextBroker() .addDestination(BrokerSupport.getConnectionContext(safeGetBroker().getContextBroker()), new ActiveMQTopic(name), true); }
@Override public void addQueue(String name) throws Exception { safeGetBroker().getContextBroker() .addDestination(BrokerSupport.getConnectionContext(safeGetBroker().getContextBroker()), new ActiveMQQueue(name), true); }
/** * @return the max size of a message (bytes) */ @Override public long getMaxMessageSize() { return safeGetBroker().getDestinationStatistics().getMessageSize().getMaxSize(); }
/** * @return the average size of a message (bytes) */ @Override public long getAverageMessageSize() { // we are okay with the size without decimals so cast to long return (long) safeGetBroker().getDestinationStatistics().getMessageSize().getAverageSize(); }
/** * @return the min size of a message (bytes) */ @Override public long getMinMessageSize() { return safeGetBroker().getDestinationStatistics().getMessageSize().getMinSize(); }
@Override public long getTotalDequeueCount() { return safeGetBroker().getDestinationStatistics().getDequeues().getCount(); }
@Override public long getTotalProducerCount() { return safeGetBroker().getDestinationStatistics().getProducers().getCount(); }
@Override public String queryQueues(String filter, int page, int pageSize) throws IOException { return DestinationsViewFilter.create(filter) .setDestinations(safeGetBroker().getQueueViews()) .filter(page, pageSize); }
@Override public String queryTopics(String filter, int page, int pageSize) throws IOException { return DestinationsViewFilter.create(filter) .setDestinations(safeGetBroker().getTopicViews()) .filter(page, pageSize); }
@Override public void destroyDurableSubscriber(String clientId, String subscriberName) throws Exception { RemoveSubscriptionInfo info = new RemoveSubscriptionInfo(); info.setClientId(clientId); info.setSubscriptionName(subscriberName); ConnectionContext context = getConnectionContext(); context.setBroker(safeGetBroker()); context.setClientId(clientId); brokerService.getBroker().removeSubscription(context, info); }