Package org.apache.activemq.artemis.jms.client

## Class ActiveMQDestination

- java.lang.Object
- - org.apache.activemq.artemis.jndi.JNDIStorable
  - - org.apache.activemq.artemis.jms.client.ActiveMQDestination

- All Implemented Interfaces:
    `java.io.Serializable`, `javax.jms.Destination`, `javax.naming.Referenceable`
  Direct Known Subclasses:
    `ActiveMQQueue`, `ActiveMQTopic`

      public class ActiveMQDestination
      extends JNDIStorable
      implements javax.jms.Destination, java.io.Serializable

  ActiveMQ Artemis implementation of a JMS Destination.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `ActiveMQDestination.TYPE` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `QUEUE_QUALIFIED_PREFIX` |
    `static java.lang.String` | `TEMP_QUEUE_QUALIFED_PREFIX` |
    `static java.lang.String` | `TEMP_TOPIC_QUALIFED_PREFIX` |
    `static java.lang.String` | `TOPIC_QUALIFIED_PREFIX` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `ActiveMQDestination​(java.lang.String address, java.lang.String name, ActiveMQDestination.TYPE type, ActiveMQSession session)` |
    `protected` | `ActiveMQDestination​(java.lang.String address, ActiveMQDestination.TYPE type, ActiveMQSession session)` |
    `protected` | `ActiveMQDestination​(org.apache.activemq.artemis.api.core.SimpleString address, java.lang.String name, ActiveMQDestination.TYPE type, ActiveMQSession session)` | Deprecated.
    `protected` | `ActiveMQDestination​(org.apache.activemq.artemis.api.core.SimpleString address, ActiveMQDestination.TYPE type, ActiveMQSession session)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `buildFromProperties​(java.util.Properties props)` | Set the properties that will represent the instance in JNDI
    `static ActiveMQDestination` | `createDestination​(java.lang.String name, ActiveMQDestination.TYPE defaultType)` | Static helper method for working with destinations.
    `static ActiveMQDestination` | `createDestination​(org.apache.activemq.artemis.api.core.RoutingType routingType, org.apache.activemq.artemis.api.core.SimpleString address)` |
    `static ActiveMQQueue` | `createQueue​(java.lang.String address)` |
    `static ActiveMQQueue` | `createQueue​(java.lang.String address, java.lang.String name)` |
    `static ActiveMQQueue` | `createQueue​(org.apache.activemq.artemis.api.core.SimpleString address)` |
    `static org.apache.activemq.artemis.api.core.SimpleString` | `createQueueAddressFromName​(java.lang.String name)` |
    `static java.lang.String` | `createQueueNameForSharedSubscription​(boolean isDurable, java.lang.String clientID, java.lang.String subscriptionName)` |
    `static org.apache.activemq.artemis.api.core.SimpleString` | `createQueueNameForSubscription​(boolean isDurable, java.lang.String clientID, java.lang.String subscriptionName)` |
    `static ActiveMQTemporaryQueue` | `createTemporaryQueue​(java.lang.String address)` |
    `static ActiveMQTemporaryQueue` | `createTemporaryQueue​(java.lang.String address, ActiveMQSession session)` |
    `static ActiveMQTemporaryQueue` | `createTemporaryQueue​(ActiveMQSession session)` |
    `static ActiveMQTemporaryQueue` | `createTemporaryQueue​(ActiveMQSession session, java.lang.String prefix)` |
    `static ActiveMQTemporaryTopic` | `createTemporaryTopic​(java.lang.String address)` |
    `static ActiveMQTemporaryTopic` | `createTemporaryTopic​(java.lang.String address, ActiveMQSession session)` |
    `static ActiveMQTemporaryTopic` | `createTemporaryTopic​(ActiveMQSession session)` |
    `static ActiveMQTemporaryTopic` | `createTemporaryTopic​(ActiveMQSession session, java.lang.String prefix)` |
    `static ActiveMQTopic` | `createTopic​(java.lang.String address)` |
    `static ActiveMQTopic` | `createTopic​(java.lang.String address, java.lang.String name)` |
    `static ActiveMQTopic` | `createTopic​(org.apache.activemq.artemis.api.core.SimpleString address)` |
    `static org.apache.activemq.artemis.api.core.SimpleString` | `createTopicAddressFromName​(java.lang.String name)` |
    `static org.apache.activemq.artemis.api.core.Pair<java.lang.String,​java.lang.String>` | `decomposeQueueNameForDurableSubscription​(java.lang.String queueName)` |
    `void` | `delete()` |
    `boolean` | `equals​(java.lang.Object o)` |
    `static javax.jms.Destination` | `fromPrefixed1XName​(java.lang.String addr, java.lang.String name)` |
    `static ActiveMQDestination` | `fromPrefixedName​(java.lang.String name)` |
    `static ActiveMQDestination` | `fromPrefixedName​(java.lang.String addr, java.lang.String name)` |
    `java.lang.String` | `getAddress()` |
    `java.lang.String` | `getName()` |
    `org.apache.activemq.artemis.api.core.QueueAttributes` | `getQueueAttributes()` | Deprecated.
    `org.apache.activemq.artemis.api.core.QueueConfiguration` | `getQueueConfiguration()` |
    `org.apache.activemq.artemis.api.core.SimpleString` | `getSimpleAddress()` |
    `ActiveMQDestination.TYPE` | `getType()` |
    `int` | `hashCode()` |
    `boolean` | `isCreated()` |
    `boolean` | `isQueue()` |
    `boolean` | `isTemporary()` |
    `protected void` | `populateProperties​(java.util.Properties props)` | Initialize the instance from properties stored in JNDI
    `void` | `setAddress​(java.lang.String address)` |
    `void` | `setCreated​(boolean created)` |
    `void` | `setSimpleAddress​(org.apache.activemq.artemis.api.core.SimpleString address)` |
    `java.lang.String` | `toString()` |

    - ### Methods inherited from class org.apache.activemq.artemis.jndi.JNDIStorable

      `getReference, readObject, writeObject`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### QUEUE_QUALIFIED_PREFIX

          public static final java.lang.String QUEUE_QUALIFIED_PREFIX

      See Also:
        Constant Field Values

    - #### TOPIC_QUALIFIED_PREFIX

          public static final java.lang.String TOPIC_QUALIFIED_PREFIX

      See Also:
        Constant Field Values

    - #### TEMP_QUEUE_QUALIFED_PREFIX

          public static final java.lang.String TEMP_QUEUE_QUALIFED_PREFIX

      See Also:
        Constant Field Values

    - #### TEMP_TOPIC_QUALIFED_PREFIX

          public static final java.lang.String TEMP_TOPIC_QUALIFED_PREFIX

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ActiveMQDestination

          protected ActiveMQDestination​(java.lang.String address,
                                        ActiveMQDestination.TYPE type,
                                        ActiveMQSession session)

    - #### ActiveMQDestination

          protected ActiveMQDestination​(org.apache.activemq.artemis.api.core.SimpleString address,
                                        ActiveMQDestination.TYPE type,
                                        ActiveMQSession session)

    - #### ActiveMQDestination

          protected ActiveMQDestination​(java.lang.String address,
                                        java.lang.String name,
                                        ActiveMQDestination.TYPE type,
                                        ActiveMQSession session)

    - #### ActiveMQDestination

          @Deprecated
          protected ActiveMQDestination​(org.apache.activemq.artemis.api.core.SimpleString address,
                                        java.lang.String name,
                                        ActiveMQDestination.TYPE type,
                                        ActiveMQSession session)

      Deprecated.

  - ### Method Detail

    - #### createDestination

          public static ActiveMQDestination createDestination​(org.apache.activemq.artemis.api.core.RoutingType routingType,
                                                              org.apache.activemq.artemis.api.core.SimpleString address)

    - #### createDestination

          public static ActiveMQDestination createDestination​(java.lang.String name,
                                                              ActiveMQDestination.TYPE defaultType)

      Static helper method for working with destinations.

    - #### fromPrefixedName

          public static ActiveMQDestination fromPrefixedName​(java.lang.String name)

    - #### fromPrefixedName

          public static ActiveMQDestination fromPrefixedName​(java.lang.String addr,
                                                             java.lang.String name)

    - #### fromPrefixed1XName

          public static javax.jms.Destination fromPrefixed1XName​(java.lang.String addr,
                                                                 java.lang.String name)

    - #### createQueueNameForSubscription

          public static org.apache.activemq.artemis.api.core.SimpleString createQueueNameForSubscription​(boolean isDurable,
                                                                                                         java.lang.String clientID,
                                                                                                         java.lang.String subscriptionName)

    - #### createQueueNameForSharedSubscription

          public static java.lang.String createQueueNameForSharedSubscription​(boolean isDurable,
                                                                              java.lang.String clientID,
                                                                              java.lang.String subscriptionName)

    - #### decomposeQueueNameForDurableSubscription

          public static org.apache.activemq.artemis.api.core.Pair<java.lang.String,​java.lang.String> decomposeQueueNameForDurableSubscription​(java.lang.String queueName)

    - #### createQueueAddressFromName

          public static org.apache.activemq.artemis.api.core.SimpleString createQueueAddressFromName​(java.lang.String name)

    - #### createTopicAddressFromName

          public static org.apache.activemq.artemis.api.core.SimpleString createTopicAddressFromName​(java.lang.String name)

    - #### createQueue

          public static ActiveMQQueue createQueue​(java.lang.String address)

    - #### createQueue

          public static ActiveMQQueue createQueue​(org.apache.activemq.artemis.api.core.SimpleString address)

    - #### createQueue

          public static ActiveMQQueue createQueue​(java.lang.String address,
                                                  java.lang.String name)

    - #### createTopic

          public static ActiveMQTopic createTopic​(java.lang.String address)

    - #### createTopic

          public static ActiveMQTopic createTopic​(org.apache.activemq.artemis.api.core.SimpleString address)

    - #### createTopic

          public static ActiveMQTopic createTopic​(java.lang.String address,
                                                  java.lang.String name)

    - #### createTemporaryQueue

          public static ActiveMQTemporaryQueue createTemporaryQueue​(java.lang.String address,
                                                                    ActiveMQSession session)

    - #### createTemporaryQueue

          public static ActiveMQTemporaryQueue createTemporaryQueue​(java.lang.String address)

    - #### createTemporaryQueue

          public static ActiveMQTemporaryQueue createTemporaryQueue​(ActiveMQSession session)

    - #### createTemporaryTopic

          public static ActiveMQTemporaryTopic createTemporaryTopic​(ActiveMQSession session)

    - #### createTemporaryQueue

          public static ActiveMQTemporaryQueue createTemporaryQueue​(ActiveMQSession session,
                                                                    java.lang.String prefix)

    - #### createTemporaryTopic

          public static ActiveMQTemporaryTopic createTemporaryTopic​(ActiveMQSession session,
                                                                    java.lang.String prefix)

    - #### createTemporaryTopic

          public static ActiveMQTemporaryTopic createTemporaryTopic​(java.lang.String address,
                                                                    ActiveMQSession session)

    - #### createTemporaryTopic

          public static ActiveMQTemporaryTopic createTemporaryTopic​(java.lang.String address)

    - #### setAddress

          public void setAddress​(java.lang.String address)

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### setSimpleAddress

          public void setSimpleAddress​(org.apache.activemq.artemis.api.core.SimpleString address)

    - #### delete

          public void delete()
                      throws javax.jms.JMSException

      Throws:
        `javax.jms.JMSException`

    - #### isQueue

          public boolean isQueue()

    - #### getAddress

          public java.lang.String getAddress()

    - #### getSimpleAddress

          public org.apache.activemq.artemis.api.core.SimpleString getSimpleAddress()

    - #### getQueueAttributes

          @Deprecated
          public org.apache.activemq.artemis.api.core.QueueAttributes getQueueAttributes()

      Deprecated.

    - #### getQueueConfiguration

          public org.apache.activemq.artemis.api.core.QueueConfiguration getQueueConfiguration()

    - #### getName

          public java.lang.String getName()

    - #### isTemporary

          public boolean isTemporary()

    - #### isCreated

          public boolean isCreated()

    - #### setCreated

          public void setCreated​(boolean created)

    - #### getType

          public ActiveMQDestination.TYPE getType()

    - #### equals

          public boolean equals​(java.lang.Object o)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### buildFromProperties

          protected void buildFromProperties​(java.util.Properties props)

      Description copied from class: `JNDIStorable`
      Set the properties that will represent the instance in JNDI
      Specified by:
        `buildFromProperties` in class `JNDIStorable`
      Parameters:
        `props` - The properties to use when building the new isntance.

    - #### populateProperties

          protected void populateProperties​(java.util.Properties props)

      Description copied from class: `JNDIStorable`
      Initialize the instance from properties stored in JNDI
      Specified by:
        `populateProperties` in class `JNDIStorable`
      Parameters:
        `props` - The properties to use when initializing the new instance.