org.apache.activemq.artemis.api.jms.management

## Interface DestinationControl

- All Known Subinterfaces:
    JMSQueueControl, TopicControl
  All Known Implementing Classes:
    JMSQueueControlImpl, JMSTopicControlImpl

      public interface DestinationControl

  A DestinationControl is used to manage a JMS Destination.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getAddress()` Returns the address corresponding to this destination.
    `int` | `getDeliveringCount()` Returns the number of messages that this queue is currently delivering to its consumers.
    `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.
    `boolean` | `isTemporary()` Returns whether this destination is temporary.
    `int` | `removeMessages(String filter)` Removed all the messages which matches the specified JMS filter from this destination.

- - ### Method Detail

    - #### getName

          String getName()

      Returns the name of this destination.

    - #### getAddress

          String getAddress()

      Returns the address corresponding to this destination.

    - #### isTemporary

          boolean isTemporary()

      Returns whether this destination is temporary.

    - #### getMessageCount

          long getMessageCount()
                        throws Exception

      Returns the number of messages currently in this destination.
      Throws:
        `Exception`

    - #### getDeliveringCount

          int getDeliveringCount()

      Returns the number of messages that this queue is currently delivering to its consumers.

    - #### getMessagesAdded

          long getMessagesAdded()

      Returns the number of messages added to this queue since it was created.

    - #### removeMessages

          int removeMessages(String filter)
                      throws Exception

      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.
      Returns:
        the number of removed messages
      Throws:
        `Exception`

Copyright © 2017 The Apache Software Foundation. All rights reserved.