com.ibm.msg.client.jms

Class JmsFactoryFactory

  • java.lang.Object
    • com.ibm.msg.client.jms.JmsFactoryFactory


  • public abstract class JmsFactoryFactory
    extends java.lang.Object
    JmsFactoryFactory is used to programmatically create connection factory and destination objects of the specified provider type. An instance of JmsFactoryFactory is obtained, specifying the provider type to be used. This JmsFactoryFactory instance will then allow creation of the connection factory and destination objects directly. A connection factory encapsulates a set of connection configuration parameters that has been defined by an administrator. A client uses it to create a connection with a JMS provider.
    See Also:
    ConnectionFactory, QueueConnectionFactory, TopicConnectionFactory, Destination, Queue, Topic
    • Method Detail

      • getInstance

        public static JmsFactoryFactory getInstance(int connectionType)
                                             throws javax.jms.JMSException
        Fetch a JmsFactoryFactory instance of the specified provider type.
        Parameters:
        connectionType - the provider type of the JmsFactoryFactory instance required, represented as an integer. For example JmsConstants.CT_WMQ
        Returns:
        the JmsFactoryFactory instance
        Throws:
        javax.jms.JMSException - if the JmsFactoryFactory instance can not be successfully created
      • getInstance

        public static JmsFactoryFactory getInstance(java.lang.String connectionTypeName)
                                             throws javax.jms.JMSException
        Fetch a JmsFactoryFactory instance of the specified provider type.
        Parameters:
        connectionTypeName - the provider type of the JmsFactoryFactory instance required, represented as a String. For example JmsConstants.WMQ_PROVIDER
        Returns:
        the JmsFactoryFactory instance
        Throws:
        javax.jms.JMSException - if the JmsFactoryFactory instance can not be successfully created
      • getInstance

        public static JmsFactoryFactory getInstance(java.util.HashMap<java.lang.String,java.lang.Object> filter)
                                             throws javax.jms.JMSException
        Fetch a JmsFactoryFactory instance of the specified provider type.
        Parameters:
        filter - Contains a series of name/value pairs identifying the provider types, which at the very least should include a key for the provider name JmsConstants.PROVIDER_NAME set to the value of the required provider, for example JmsConstants.WMQ_PROVIDER. In addition, by using the key JmsConstants.PROVIDER_VRMF you can specify the version of the Component returned.
        Returns:
        the JmsFactoryFactory instance
        Throws:
        javax.jms.JMSException - if the JmsFactoryFactory instance can not be successfully created
      • createConnectionFactory

        public abstract JmsConnectionFactory createConnectionFactory()
                                                              throws javax.jms.JMSException
        Creates an instance of a JmsConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
        Returns:
        a JmsConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsConnectionFactory can not be successfully created
      • createConnectionFactory

        public abstract JmsConnectionFactory createConnectionFactory(java.lang.String name)
                                                              throws javax.jms.JMSException
        Creates an instance of a JmsConnectionFactory of the provider type associated with this JmsFactoryFactory instance using the name provided.
        Parameters:
        name - the name of the JmsConnectionFactory to be created
        Returns:
        a JmsConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsConnectionFactory can not be successfully created
      • createQueueConnectionFactory

        public abstract JmsQueueConnectionFactory createQueueConnectionFactory()
                                                                        throws javax.jms.JMSException
        Creates an instance of a JmsQueueConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
        Returns:
        a JmsQueueConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsQueueConnectionFactory can not be successfully created
      • createQueueConnectionFactory

        public abstract JmsQueueConnectionFactory createQueueConnectionFactory(java.lang.String uri)
                                                                        throws javax.jms.JMSException
        Creates an instance of a JmsQueueConnectionFactory of the provider type associated with this JmsFactoryFactory instance using the uri provided.
        Parameters:
        uri - a uri specifying the details of the JmsQueueConnectionFactory to be created
        Returns:
        a JmsQueueConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsQueueConnectionFactory can not be successfully created
      • createTopicConnectionFactory

        public abstract JmsTopicConnectionFactory createTopicConnectionFactory()
                                                                        throws javax.jms.JMSException
        Creates an instance of a JmsTopicConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
        Returns:
        a JmsTopicConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsTopicConnectionFactory can not be successfully created
      • createTopicConnectionFactory

        public abstract JmsTopicConnectionFactory createTopicConnectionFactory(java.lang.String uri)
                                                                        throws javax.jms.JMSException
        Creates an instance of a JmsTopicConnectionFactory of the provider type associated with this JmsFactoryFactory instance using the uri provided.
        Parameters:
        uri - a uri specifying the details of the JmsTopicConnectionFactory to be created
        Returns:
        a JmsTopicConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsTopicConnectionFactory can not be successfully created
      • createQueue

        public abstract JmsQueue createQueue(java.lang.String name)
                                      throws javax.jms.JMSException
        Creates an instance of a JmsQueue of the provider type associated with this JmsFactoryFactory instance.
        Parameters:
        name - the name of the JmsQueue to be created
        Returns:
        a JmsQueue instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsQueue can not be successfully created
      • createTopic

        public abstract JmsTopic createTopic(java.lang.String name)
                                      throws javax.jms.JMSException
        Creates an instance of a JmsTopic of the provider type associated with this JmsFactoryFactory instance.
        Parameters:
        name - the name of the JmsTopic to be created
        Returns:
        a JmsTopic instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsTopic can not be successfully created
      • createXAConnectionFactory

        public abstract JmsXAConnectionFactory createXAConnectionFactory()
                                                                  throws javax.jms.JMSException
        Creates an instance of a JmsXAConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
        Returns:
        a JmsXAConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsXAConnectionFactory can not be successfully created
      • createXAConnectionFactory

        public abstract JmsXAConnectionFactory createXAConnectionFactory(java.lang.String uri)
                                                                  throws javax.jms.JMSException
        Creates an instance of a JmsXAConnectionFactory of the provider type associated with this JmsFactoryFactory instance using the uri provided.
        Parameters:
        uri - a uri specifying the details of the JmsXAConnectionFactory to be created
        Returns:
        a JmsXAConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsXAConnectionFactory can not be successfully created
      • createXAQueueConnectionFactory

        public abstract JmsXAQueueConnectionFactory createXAQueueConnectionFactory()
                                                                            throws javax.jms.JMSException
        Creates an instance of a JmsXAQueueConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
        Returns:
        a JmsXAQueueConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsXAQueueConnectionFactory can not be successfully created
      • createXAQueueConnectionFactory

        public abstract JmsXAQueueConnectionFactory createXAQueueConnectionFactory(java.lang.String uri)
                                                                            throws javax.jms.JMSException
        Creates an instance of a JmsXAQueueConnectionFactory of the provider type associated with this JmsFactoryFactory instance using the uri provided.
        Parameters:
        uri - a uri specifying the details of the JmsXAQueueConnectionFactory to be created
        Returns:
        a JmsXAQueueConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsXAQueueConnectionFactory can not be successfully created
      • createXATopicConnectionFactory

        public abstract JmsXATopicConnectionFactory createXATopicConnectionFactory()
                                                                            throws javax.jms.JMSException
        Creates an instance of a JmsXATopicConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
        Returns:
        a JmsXATopicConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsXATopicConnectionFactory can not be successfully created
      • createXATopicConnectionFactory

        public abstract JmsXATopicConnectionFactory createXATopicConnectionFactory(java.lang.String uri)
                                                                            throws javax.jms.JMSException
        Creates an instance of a JmsXATopicConnectionFactory of the provider type associated with this JmsFactoryFactory instance using the uri provided.
        Parameters:
        uri - a uri specifying the details of the JmsXATopicConnectionFactory to be created
        Returns:
        a JmsXATopicConnectionFactory instance of the JmsFactoryFactory's provider type.
        Throws:
        javax.jms.JMSException - if the JmsXATopicConnectionFactory can not be successfully created
      • createConnectionFactory

        public abstract JmsConnectionFactory createConnectionFactory(short flag)
                                                              throws javax.jms.JMSException
        Creates a Connection Factory as specified by the supplied flag. The flag is based around a bitmask. For example createConnectionFactory(JmsConstants.ADMIN_QUEUE_DOMAIN | JmsConstants.ADMIN_XA) will create a XAQueueConnectionFacotry
        Parameters:
        flag -
        Returns:
        Created JmsConnectionFactory
        Throws:
        javax.jms.JMSException
      • createDestination

        public abstract JmsDestination createDestination(short flag,
                                       java.lang.String name)
                                                  throws javax.jms.JMSException
        Creates a Destination as specified by the supplied flag. The flag is based around a bitmask. For example createConnectionFactory(JmsConstants.ADMIN_QUEUE_DOMAIN) will create a Queue
        Parameters:
        flag -
        name -
        Returns:
        Create JmsDestination
        Throws:
        javax.jms.JMSException
      • createJmsObject

        public abstract JmsPropertyContext createJmsObject(short flag,
                                         java.lang.Object parameter)
                                                    throws javax.jms.JMSException
        Creates a Jms Admin object as specificed by the required flag parameter. Objects available for creation include connection factories (queue and topic) and destinations (queues and topics). The flag is specified as a bitmask built upon defined Jms Constants. The parameter 'parameter' of type Object is required only when the type of Jms Admin object to be created requires it.

        This method might be useful to an application when the type of Jms Admin object to create is known only at runtime and not at compile time.

        For example, to create a XAQueueConnectionFactory object you would pass in ( JmsConstants.ADMIN_CONNECTION_FACTORY | JmsConstants.ADMIN_QUEUE_DOMAIN | JmsConstants.ADMIN_XA ) as the value of the flag parameter. Null should be passed as the value for the parameter 'parameter' in this case.

        As another example, to create a queue object, you would pass in ( JmsConstants.ADMIN_DESTINATION | JmsConstants.ADMIN_QUEUE_DOMAIN ) as the value of the flag parameter and pass any string, accepted by the com.ibm.mq.jms.MQQueue#MQQueue(String) constructor, as the value for the 'parameter' parameter.

        Parameters:
        flag - Bitmask to determine to tye of Jms Admin object to create.
        parameter - Used to provide further information for particular Jms Admin objects.
        Returns:
        A Jms Admin object.
        Throws:
        javax.jms.JMSException
      • getConnectionType

        public abstract int getConnectionType()
        Returns the provider type associated with this JmsFactoryFactory instance as an integer.
        Returns:
        the provider type.
      • getConnectionTypeName

        public abstract java.lang.String getConnectionTypeName()
        Returns the provider type associated with this JmsFactoryFactory instance as a String.
        Returns:
        the provider type.
      • getCapabilities

        public abstract JmsCapabilityContext getCapabilities()
                                                      throws javax.jms.JMSException
        Returns an instance of JmsCapabilityContext, which is used to determine the capabilities of the provider specified by this instance of the JmsFactoryFactory.
        Returns:
        a JmsCapabilityContext from which information on properties valid for this JmsFactoryFactory instance can be retrieved
        Throws:
        javax.jms.JMSException - if the JmsCapabilityContext can not be successfully retrieved.
(c) Copyright IBM Corp. 2008, 2015. All Rights Reserved.