org.apache.activemq.artemis.jms.management.impl

## Class JMSTopicControlImpl

- java.lang.Object
- - javax.management.StandardMBean
  - - org.apache.activemq.artemis.jms.management.impl.JMSTopicControlImpl

- All Implemented Interfaces:
    DynamicMBean, MBeanRegistration, DestinationControl, TopicControl

      public class JMSTopicControlImpl
      extends StandardMBean
      implements TopicControl

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JMSTopicControlImpl(ActiveMQDestination topic, JMSServerManager jmsServerManager, AddressControl addressControl, org.apache.activemq.artemis.core.server.management.ManagementService managementService)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addBinding(String binding)` Add the Registry binding to this destination
    `int` | `countMessagesForSubscription(String clientID, String subscriptionName, String filterStr)` Counts the number of messages in the subscription specified by the specified client ID and subscription name.
    `static String` | `createFilterFromJMSSelector(String selectorStr)`
    `void` | `dropAllSubscriptions()` Drops all subscriptions.
    `void` | `dropDurableSubscription(String clientID, String subscriptionName)` Drops the subscription specified by the specified client ID and subscription name.
    `String` | `getAddress()` Returns the ActiveMQ Artemis address corresponding to this destination.
    `int` | `getDeliveringCount()` Returns the number of messages that this queue is currently delivering to its consumers.
    `int` | `getDurableMessageCount()` Returns the number of messages for all durable subscribers for this topic.
    `int` | `getDurableSubscriptionCount()` Returns the number of durable subscribers for this topic.
    `MBeanInfo` | `getMBeanInfo()`
    `long` | `getMessageCount()` Returns the number of messages currently in this destination.
    `long` | `getMessagesAdded()` Returns the number of messages added to this queue since it was created.
    `String` | `getName()` Returns the name of this destination.
    `int` | `getNonDurableMessageCount()` Returns the number of messages for all non-durable subscribers for this topic.
    `int` | `getNonDurableSubscriptionCount()` Returns the number of non-durable subscribers for this topic.
    `String[]` | `getRegistryBindings()` Returns the Registry bindings associated to this connection factory.
    `int` | `getSubscriptionCount()` Returns the number of (durable and non-durable) subscribers for this topic.
    `boolean` | `isTemporary()` Returns whether this destination is temporary.
    `Object[]` | `listAllSubscriptions()` Lists all the subscriptions for this topic (both durable and non-durable).
    `String` | `listAllSubscriptionsAsJSON()` Lists all the subscriptions for this topic (both durable and non-durable) using JSON serialization.
    `Object[]` | `listDurableSubscriptions()` Lists all the durable subscriptions for this topic.
    `String` | `listDurableSubscriptionsAsJSON()` Lists all the durable subscriptions using JSON serialization.
    `Map<String,Object>[]` | `listMessagesForSubscription(String queueName)` Lists all the messages in this queue matching the specified queue representing the subscription.
    `String` | `listMessagesForSubscriptionAsJSON(String queueName)` Lists all the messages in this queue matching the specified queue representing the subscription using JSON serialization.
    `Object[]` | `listNonDurableSubscriptions()` Lists all the non-durable subscriptions for this topic.
    `String` | `listNonDurableSubscriptionsAsJSON()` Lists all the non-durable subscriptions using JSON serialization.
    `int` | `removeMessages(String filterStr)` Removed all the messages which matches the specified JMS filter from this destination.

    - ### Methods inherited from class javax.management.StandardMBean

      `cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JMSTopicControlImpl

          public JMSTopicControlImpl(ActiveMQDestination topic,
                                     JMSServerManager jmsServerManager,
                                     AddressControl addressControl,
                                     org.apache.activemq.artemis.core.server.management.ManagementService managementService)
                              throws Exception

      Throws:
        `Exception`

  - ### Method Detail

    - #### createFilterFromJMSSelector

          public static String createFilterFromJMSSelector(String selectorStr)
                                                    throws ActiveMQException

      Throws:
        `ActiveMQException`

    - #### addBinding

          public void addBinding(String binding)
                          throws Exception

      Description copied from interface: `TopicControl`
      Add the Registry binding to this destination
      Specified by:
        `addBinding` in interface `TopicControl`
      Throws:
        `Exception`

    - #### getRegistryBindings

          public String[] getRegistryBindings()

      Description copied from interface: `TopicControl`
      Returns the Registry bindings associated to this connection factory.
      Specified by:
        `getRegistryBindings` in interface `TopicControl`

    - #### getName

          public String getName()

      Description copied from interface: `DestinationControl`
      Returns the name of this destination.
      Specified by:
        `getName` in interface `DestinationControl`

    - #### isTemporary

          public boolean isTemporary()

      Description copied from interface: `DestinationControl`
      Returns whether this destination is temporary.
      Specified by:
        `isTemporary` in interface `DestinationControl`

    - #### getAddress

          public String getAddress()

      Description copied from interface: `DestinationControl`
      Returns the ActiveMQ Artemis address corresponding to this destination.
      Specified by:
        `getAddress` in interface `DestinationControl`

    - #### getMessageCount

          public long getMessageCount()

      Description copied from interface: `DestinationControl`
      Returns the number of messages currently in this destination.
      Specified by:
        `getMessageCount` in interface `DestinationControl`

    - #### getDeliveringCount

          public int getDeliveringCount()

      Description copied from interface: `DestinationControl`
      Returns the number of messages that this queue is currently delivering to its consumers.
      Specified by:
        `getDeliveringCount` in interface `DestinationControl`

    - #### getMessagesAdded

          public long getMessagesAdded()

      Description copied from interface: `DestinationControl`
      Returns the number of messages added to this queue since it was created.
      Specified by:
        `getMessagesAdded` in interface `DestinationControl`

    - #### getDurableMessageCount

          public int getDurableMessageCount()

      Description copied from interface: `TopicControl`
      Returns the number of messages for all durable subscribers for this topic.
      Specified by:
        `getDurableMessageCount` in interface `TopicControl`

    - #### getNonDurableMessageCount

          public int getNonDurableMessageCount()

      Description copied from interface: `TopicControl`
      Returns the number of messages for all non-durable subscribers for this topic.
      Specified by:
        `getNonDurableMessageCount` in interface `TopicControl`

    - #### getSubscriptionCount

          public int getSubscriptionCount()

      Description copied from interface: `TopicControl`
      Returns the number of (durable and non-durable) subscribers for this topic.
      Specified by:
        `getSubscriptionCount` in interface `TopicControl`

    - #### getDurableSubscriptionCount

          public int getDurableSubscriptionCount()

      Description copied from interface: `TopicControl`
      Returns the number of durable subscribers for this topic.
      Specified by:
        `getDurableSubscriptionCount` in interface `TopicControl`

    - #### getNonDurableSubscriptionCount

          public int getNonDurableSubscriptionCount()

      Description copied from interface: `TopicControl`
      Returns the number of non-durable subscribers for this topic.
      Specified by:
        `getNonDurableSubscriptionCount` in interface `TopicControl`

    - #### listAllSubscriptions

          public Object[] listAllSubscriptions()

      Description copied from interface: `TopicControl`
      Lists all the subscriptions for this topic (both durable and non-durable).
      Specified by:
        `listAllSubscriptions` in interface `TopicControl`

    - #### listAllSubscriptionsAsJSON

          public String listAllSubscriptionsAsJSON()
                                            throws Exception

      Description copied from interface: `TopicControl`
      Lists all the subscriptions for this topic (both durable and non-durable) using JSON serialization.
      Java objects can be recreated from JSON serialization using `SubscriptionInfo.from(String)`.
      Specified by:
        `listAllSubscriptionsAsJSON` in interface `TopicControl`
      Throws:
        `Exception`

    - #### listDurableSubscriptions

          public Object[] listDurableSubscriptions()

      Description copied from interface: `TopicControl`
      Lists all the durable subscriptions for this topic.
      Specified by:
        `listDurableSubscriptions` in interface `TopicControl`

    - #### listDurableSubscriptionsAsJSON

          public String listDurableSubscriptionsAsJSON()
                                                throws Exception

      Description copied from interface: `TopicControl`
      Lists all the durable subscriptions using JSON serialization.
      Java objects can be recreated from JSON serialization using `SubscriptionInfo.from(String)`.
      Specified by:
        `listDurableSubscriptionsAsJSON` in interface `TopicControl`
      Throws:
        `Exception`

    - #### listNonDurableSubscriptions

          public Object[] listNonDurableSubscriptions()

      Description copied from interface: `TopicControl`
      Lists all the non-durable subscriptions for this topic.
      Specified by:
        `listNonDurableSubscriptions` in interface `TopicControl`

    - #### listNonDurableSubscriptionsAsJSON

          public String listNonDurableSubscriptionsAsJSON()
                                                   throws Exception

      Description copied from interface: `TopicControl`
      Lists all the non-durable subscriptions using JSON serialization.
      Java objects can be recreated from JSON serialization using `SubscriptionInfo.from(String)`.
      Specified by:
        `listNonDurableSubscriptionsAsJSON` in interface `TopicControl`
      Throws:
        `Exception`

    - #### listMessagesForSubscription

          public Map<String,Object>[] listMessagesForSubscription(String queueName)
                                                           throws Exception

      Description copied from interface: `TopicControl`
      Lists all the messages in this queue matching the specified queue representing the subscription.
      1 Map represents 1 message, keys are the message's properties and headers, values are the corresponding values.
      Specified by:
        `listMessagesForSubscription` in interface `TopicControl`
      Throws:
        `Exception`

    - #### listMessagesForSubscriptionAsJSON

          public String listMessagesForSubscriptionAsJSON(String queueName)
                                                   throws Exception

      Description copied from interface: `TopicControl`
      Lists all the messages in this queue matching the specified queue representing the subscription using JSON serialization.
      Specified by:
        `listMessagesForSubscriptionAsJSON` in interface `TopicControl`
      Throws:
        `Exception`

    - #### countMessagesForSubscription

          public int countMessagesForSubscription(String clientID,
                                                  String subscriptionName,
                                                  String filterStr)
                                           throws Exception

      Description copied from interface: `TopicControl`
      Counts the number of messages in the subscription specified by the specified client ID and subscription name. Only messages matching the filter will be counted.
      Using `null` or an empty filter will count all messages from this queue.
      Specified by:
        `countMessagesForSubscription` in interface `TopicControl`
      Throws:
        `Exception`

    - #### removeMessages

          public int removeMessages(String filterStr)
                             throws Exception

      Description copied from interface: `DestinationControl`
      Removed all the messages which matches the specified JMS filter from this destination.
      Using `null` or an empty filter will remove all messages from this destination.
      Specified by:
        `removeMessages` in interface `DestinationControl`
      Returns:
        the number of removed messages
      Throws:
        `Exception`

    - #### dropDurableSubscription

          public void dropDurableSubscription(String clientID,
                                              String subscriptionName)
                                       throws Exception

      Description copied from interface: `TopicControl`
      Drops the subscription specified by the specified client ID and subscription name.
      Specified by:
        `dropDurableSubscription` in interface `TopicControl`
      Throws:
        `Exception`

    - #### dropAllSubscriptions

          public void dropAllSubscriptions()
                                    throws Exception

      Description copied from interface: `TopicControl`
      Drops all subscriptions.
      Specified by:
        `dropAllSubscriptions` in interface `TopicControl`
      Throws:
        `Exception`

    - #### getMBeanInfo

          public MBeanInfo getMBeanInfo()

      Specified by:
        `getMBeanInfo` in interface `DynamicMBean`
      Overrides:
        `getMBeanInfo` in class `StandardMBean`

Copyright © 2017. All rights reserved.