org.apache.activemq.artemis.jndi

## Class ActiveMQInitialContextFactory

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

- All Implemented Interfaces:
    InitialContextFactory

      public class ActiveMQInitialContextFactory
      extends Object
      implements 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 and Description
    --- | ---
    `static String` | `DISCOVERY_INITIAL_WAIT_TIMEOUT`
    `static String` | `DYNAMIC_QUEUE_CONTEXT`
    `static String` | `DYNAMIC_TOPIC_CONTEXT`
    `static String` | `REFRESH_TIMEOUT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ActiveMQInitialContextFactory()`

  - ### Method Summary

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

      See Also:
        Constant Field Values

    - #### DISCOVERY_INITIAL_WAIT_TIMEOUT

          public static final String DISCOVERY_INITIAL_WAIT_TIMEOUT

      See Also:
        Constant Field Values

    - #### DYNAMIC_QUEUE_CONTEXT

          public static final String DYNAMIC_QUEUE_CONTEXT

      See Also:
        Constant Field Values

    - #### DYNAMIC_TOPIC_CONTEXT

          public static final String DYNAMIC_TOPIC_CONTEXT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ActiveMQInitialContextFactory

          public ActiveMQInitialContextFactory()

  - ### Method Detail

    - #### getInitialContext

          public Context getInitialContext(Hashtable<?,?> environment)
                                    throws NamingException

      Specified by:
        `getInitialContext` in interface `InitialContextFactory`
      Throws:
        `NamingException`

    - #### getTopicPrefix

          public String getTopicPrefix()

    - #### setTopicPrefix

          public void setTopicPrefix(String topicPrefix)

    - #### getQueuePrefix

          public String getQueuePrefix()

    - #### setQueuePrefix

          public void setQueuePrefix(String queuePrefix)

    - #### createContext

          protected ReadOnlyContext createContext(Hashtable<?,?> environment,
                                                  Map<String,Object> data)

    - #### createQueues

          protected void createQueues(Map<String,Object> data,
                                      Hashtable<?,?> environment)

    - #### createTopics

          protected void createTopics(Map<String,Object> data,
                                      Hashtable<?,?> environment)

    - #### createQueue

          protected javax.jms.Queue createQueue(String name)

      Factory method to create new Queue instances

    - #### createTopic

          protected javax.jms.Topic createTopic(String name)

      Factory method to create new Topic instances

    - #### createConnectionFactory

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

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

    - #### createConnectionFactory

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

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

    - #### getFactoryType

          public JMSFactoryType getFactoryType(String uri)
                                        throws Exception

      Throws:
        `Exception`

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