com.ibm.msg.client.jms

Class JmsFactoryFactory

  1. java.lang.Object
  2. extended bycom.ibm.msg.client.jms.JmsFactoryFactory

  1. public abstract class JmsFactoryFactory
  2. 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 Summary

Modifier and Type Method and Description
  1. abstract
  2. JmsConnectionFactory
createConnectionFactory()
Creates an instance of a JmsConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
  1. abstract
  2. JmsConnectionFactory
createConnectionFactory(short flag)
Creates a Connection Factory as specified by the supplied flag.
  1. abstract
  2. JmsDestination
createDestination(short flag,java.lang.String name)
Creates a Destination as specified by the supplied flag.
  1. abstract
  2. JmsPropertyContext
createJmsObject(short flag,java.lang.Object parameter)
Creates a Jms Admin object as specificed by the required flag parameter.
  1. abstract
  2. JmsQueue
createQueue(java.lang.String name)
Creates an instance of a JmsQueue of the provider type associated with this JmsFactoryFactory instance.
  1. abstract
  2. JmsQueueConnectionFactory
createQueueConnectionFactory()
Creates an instance of a JmsQueueConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
  1. abstract
  2. JmsTopic
createTopic(java.lang.String name)
Creates an instance of a JmsTopic of the provider type associated with this JmsFactoryFactory instance.
  1. abstract
  2. JmsTopicConnectionFactory
createTopicConnectionFactory()
Creates an instance of a JmsTopicConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
  1. abstract
  2. JmsXAConnectionFactory
createXAConnectionFactory()
Creates an instance of a JmsXAConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
  1. abstract
  2. JmsXAQueueConnectionFactory
createXAQueueConnectionFactory()
Creates an instance of a JmsXAQueueConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
  1. abstract
  2. JmsXATopicConnectionFactory
createXATopicConnectionFactory()
Creates an instance of a JmsXATopicConnectionFactory of the provider type associated with this JmsFactoryFactory instance.
  1. abstract
  2. JmsCapabilityContext
getCapabilities()
Returns an instance of JmsCapabilityContext, which is used to determine the capabilities of the provider specified by this instance of the JmsFactoryFactory.
  1. abstract
  2. int
getConnectionType()
Returns the provider type associated with this JmsFactoryFactory instance as an integer.
  1. abstract
  2. java.lang.String
getConnectionTypeName()
Returns the provider type associated with this JmsFactoryFactory instance as a String.
  1. static
  2. JmsFactoryFactory
getInstance(java.util.HashMap<java.lang.Object,java.lang.Object> filter)
Fetch a JmsFactoryFactory instance of the specified provider type.
  1. static
  2. JmsFactoryFactory
getInstance(int connectionType)
Fetch a JmsFactoryFactory instance of the specified provider type.
  1. static
  2. JmsFactoryFactory
getInstance(java.lang.String connectionTypeName)
Fetch a JmsFactoryFactory instance of the specified provider type.
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getInstance

  1. public static JmsFactoryFactory getInstance( int connectionType)
  2. 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

  1. public static JmsFactoryFactory getInstance( java.lang.String connectionTypeName)
  2. 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

  1. public static JmsFactoryFactory getInstance( java.util.HashMap<java.lang.Object,java.lang.Object> filter)
  2. 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

  1. public abstract JmsConnectionFactory createConnectionFactory( )
  2. 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

createQueueConnectionFactory

  1. public abstract JmsQueueConnectionFactory createQueueConnectionFactory( )
  2. 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

createTopicConnectionFactory

  1. public abstract JmsTopicConnectionFactory createTopicConnectionFactory( )
  2. 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

createQueue

  1. public abstract JmsQueue createQueue( java.lang.String name)
  2. 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

  1. public abstract JmsTopic createTopic( java.lang.String name)
  2. 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

  1. public abstract JmsXAConnectionFactory createXAConnectionFactory( )
  2. 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

createXAQueueConnectionFactory

  1. public abstract JmsXAQueueConnectionFactory createXAQueueConnectionFactory( )
  2. 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

createXATopicConnectionFactory

  1. public abstract JmsXATopicConnectionFactory createXATopicConnectionFactory( )
  2. 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

createConnectionFactory

  1. public abstract JmsConnectionFactory createConnectionFactory( short flag)
  2. 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:
Throws:
javax.jms.JMSException

createDestination

  1. public abstract JmsDestination createDestination( short flag,
  2. java.lang.String name)
  3. 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 -
Returns:
Throws:
javax.jms.JMSException

createJmsObject

  1. public abstract JmsPropertyContext createJmsObject( short flag,
  2. java.lang.Object parameter)
  3. 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 MQQueue 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

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

getConnectionTypeName

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

getCapabilities

  1. public abstract JmsCapabilityContext getCapabilities( )
  2. 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.