Package org.apache.activemq.artemis.jndi

## Class ActiveMQInitialContextFactory

- java.lang.Object
- - org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory

- All Implemented Interfaces:
    `javax.naming.spi.InitialContextFactory`

      public class ActiveMQInitialContextFactory
      extends java.lang.Object
      implements javax.naming.spi.InitialContextFactory

  A factory of the ActiveMQ Artemis InitialContext which contains `ConnectionFactory` instances as well as a child context called destinations which contain all of the current active destinations, in child context depending on the QoS such as transient or durable and queue or topic.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static java.lang.String` | `DISCOVERY_INITIAL_WAIT_TIMEOUT` |
    `static java.lang.String` | `DYNAMIC_QUEUE_CONTEXT` |
    `static java.lang.String` | `DYNAMIC_TOPIC_CONTEXT` |
    `static java.lang.String` | `REFRESH_TIMEOUT` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ActiveMQInitialContextFactory()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected javax.jms.ConnectionFactory` | `createConnectionFactory​(java.lang.String uri, java.lang.String name)` | Factory method to create a new connection factory from the given environment
    `protected javax.jms.ConnectionFactory` | `createConnectionFactory​(java.lang.String uri, java.util.Map<java.lang.String,​java.lang.String> overrides, java.lang.String name)` | Factory method to create a new connection factory from the given environment, with overrides
    `protected ReadOnlyContext` | `createContext​(java.util.Hashtable<?,​?> environment, java.util.Map<java.lang.String,​java.lang.Object> data)` |
    `protected javax.jms.Queue` | `createQueue​(java.lang.String name)` | Factory method to create new Queue instances
    `protected void` | `createQueues​(java.util.Map<java.lang.String,​java.lang.Object> data, java.util.Hashtable<?,​?> environment)` |
    `protected javax.jms.Topic` | `createTopic​(java.lang.String name)` | Factory method to create new Topic instances
    `protected void` | `createTopics​(java.util.Map<java.lang.String,​java.lang.Object> data, java.util.Hashtable<?,​?> environment)` |
    `JMSFactoryType` | `getFactoryType​(java.lang.String uri)` |
    `javax.naming.Context` | `getInitialContext​(java.util.Hashtable<?,​?> environment)` |
    `java.lang.String` | `getQueuePrefix()` |
    `java.lang.String` | `getTopicPrefix()` |
    `void` | `setQueuePrefix​(java.lang.String queuePrefix)` |
    `void` | `setTopicPrefix​(java.lang.String topicPrefix)` |

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

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

- - ### Field Detail

    - #### REFRESH_TIMEOUT

          public static final java.lang.String REFRESH_TIMEOUT

      See Also:
        Constant Field Values

    - #### DISCOVERY_INITIAL_WAIT_TIMEOUT

          public static final java.lang.String DISCOVERY_INITIAL_WAIT_TIMEOUT

      See Also:
        Constant Field Values

    - #### DYNAMIC_QUEUE_CONTEXT

          public static final java.lang.String DYNAMIC_QUEUE_CONTEXT

      See Also:
        Constant Field Values

    - #### DYNAMIC_TOPIC_CONTEXT

          public static final java.lang.String DYNAMIC_TOPIC_CONTEXT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ActiveMQInitialContextFactory

          public ActiveMQInitialContextFactory()

  - ### Method Detail

    - #### getInitialContext

          public javax.naming.Context getInitialContext​(java.util.Hashtable<?,​?> environment)
                                                 throws javax.naming.NamingException

      Specified by:
        `getInitialContext` in interface `javax.naming.spi.InitialContextFactory`
      Throws:
        `javax.naming.NamingException`

    - #### getTopicPrefix

          public java.lang.String getTopicPrefix()

    - #### setTopicPrefix

          public void setTopicPrefix​(java.lang.String topicPrefix)

    - #### getQueuePrefix

          public java.lang.String getQueuePrefix()

    - #### setQueuePrefix

          public void setQueuePrefix​(java.lang.String queuePrefix)

    - #### createContext

          protected ReadOnlyContext createContext​(java.util.Hashtable<?,​?> environment,
                                                  java.util.Map<java.lang.String,​java.lang.Object> data)

    - #### createQueues

          protected void createQueues​(java.util.Map<java.lang.String,​java.lang.Object> data,
                                      java.util.Hashtable<?,​?> environment)

    - #### createTopics

          protected void createTopics​(java.util.Map<java.lang.String,​java.lang.Object> data,
                                      java.util.Hashtable<?,​?> environment)

    - #### createQueue

          protected javax.jms.Queue createQueue​(java.lang.String name)

      Factory method to create new Queue instances

    - #### createTopic

          protected javax.jms.Topic createTopic​(java.lang.String name)

      Factory method to create new Topic instances

    - #### createConnectionFactory

          protected javax.jms.ConnectionFactory createConnectionFactory​(java.lang.String uri,
                                                                        java.lang.String name)
                                                                 throws java.lang.Exception

      Factory method to create a new connection factory from the given environment
      Throws:
        `java.lang.Exception`

    - #### createConnectionFactory

          protected javax.jms.ConnectionFactory createConnectionFactory​(java.lang.String uri,
                                                                        java.util.Map<java.lang.String,​java.lang.String> overrides,
                                                                        java.lang.String name)
                                                                 throws java.lang.Exception

      Factory method to create a new connection factory from the given environment, with overrides
      Throws:
        `java.lang.Exception`

    - #### getFactoryType

          public JMSFactoryType getFactoryType​(java.lang.String uri)
                                        throws java.lang.Exception

      Throws:
        `java.lang.Exception`