TopicConnectionFactory


public interface TopicConnectionFactory
extends ConnectionFactory
Subinterfaces: XATopicConnectionFactory

WebSphere MQ class: MQTopicConnectionFactory



java.lang.Object
   |
   +----com.ibm.mq.jms.MQConnectionFactory
           |
           +----com.ibm.mq.jms.MQTopicConnectionFactory

A client uses a TopicConnectionFactory to create TopicConnections with a JMS Publish/Subscribe provider.

WebSphere MQ Event Broker note

For direct connections to WebSphere MQ Event Broker, properties accessed by methods marked with a "§" are ignored.

See also: ConnectionFactory and XATopicConnectionFactory

WebSphere MQ constructor

MQTopicConnectionFactory
public MQTopicConnectionFactory()

Methods

createTopicConnection
public TopicConnection createTopicConnection()
                                       throws JMSException

Create a topic connection with default user identity. The connection is created in stopped mode. No messages will be delivered until Connection.start method is explicitly called.

Returns:
a newly created topic connection.

Throws:
  • JMSException - if JMS Provider fails to create a Topic Connection because of an internal error.
  • JMSSecurityException - if client authentication fails because of a non valid user name or password.

createTopicConnection
public TopicConnection createTopicConnection
                                       (java.lang.String userName,
                                       java.lang.String password)
                                       throws JMSException

Create a topic connection with specified user identity. The connection is created in stopped mode. No messages will be delivered until Connection.start method is explicitly called.

Parameters:
  • userName - the caller's user name.
  • password - the caller's password.

Returns:
a newly created topic connection.

Throws:
  • JMSException - if JMS Provider fails to create a Topic Connection because of an internal error.
  • JMSSecurityException - if client authentication fails because of a non valid user name or password.
Note:
This method is valid only for transport type IBM_JMS_TP_CLIENT_MQ_TCPIP. See ConnectionFactory.

getBrokerCCSubQueue * §
public String getBrokerCCSubQueue()

Get method for brokerCCSubQueue attribute.

Returns:
the name of the non-durable subscription queue to use for a ConnectionConsumer.

getBrokerControlQueue * §
public String getBrokerControlQueue()

Get method for brokerControlQueue attribute.

Returns:
the broker's control queue name

getBrokerPubQueue * §
public String getBrokerPubQueue()

Get method for brokerPubQueue attribute.

Returns:
the broker's publish queue name.

getBrokerQueueManager * §
public String getBrokerQueueManager()

Get method for brokerQueueManager attribute.

Returns:
the broker's queue manager name.

getBrokerSubQueue * §
public String getBrokerSubQueue()

Get method for brokerSubQueue attribute.

Returns:
the name of the non-durable subscription queue to use.

getBrokerVersion *
public int getBrokerVersion()

Get method for brokerVersion attribute.

Returns:
the broker's version number

getCleanupInterval * §
public long getCleanupInterval()

Get method for cleanupInterval attribute.

Returns:
how often the cleanup utility will run, in milliseconds

getCleanupLevel * §
public int getCleanupLevel()

Get method for cleanupLevel attribute.

Returns:
the value of cleanupLevel

getPubAckInterval * §
public int getPubAckInterval()

Get method for pubAckInterval attribute.

Returns:
the interval, in number of messages, between publish requests that require acknowledgement from the broker.

getReference *
public Reference getReference()

Return a reference for this topic connection factory.

Returns:
a reference for this topic connection factory.

Throws:
NamingException.

getStatusRefreshInterval * §
public int getStatusRefreshInterval()

Get method for statusRefreshInterval attribute.

Returns:
the number of milliseconds between transactions to refresh publish/subscribe status.

getSubscriptionStore * §
public int getSubscriptionStore()

Get method for SUBSTORE property.

Returns:
an integer representing the current SUBSTORE property type.

setBrokerCCSubQueue * §
public void setBrokerCCSubQueue(String x) throws JMSException

Set method for brokerCCSubQueue attribute.

Parameters:
brokerSubQueue - the name of the non-durable subscription queue to use for a ConnectionConsumer.

setBrokerControlQueue * §
public void setBrokerControlQueue(String x) throws JMSException

Set method for brokerControlQueue attribute.

Parameters:
brokerControlQueue - the name of the broker control queue.

setBrokerPubQueue * §
public void setBrokerPubQueue(String x) throws JMSException

Set method for brokerPubQueue attribute.

Parameters:
brokerPubQueue - the name of the broker publish queue.

setBrokerQueueManager * §
public void setBrokerQueueManager(String x) throws JMSException

Set method for brokerQueueManager attribute.

Parameters:
brokerQueueManager - the name of the broker's Queue Manager.

setBrokerSubQueue * §
public void setBrokerSubQueue(String x) throws JMSException

Set method for brokerSubQueue attribute.

Parameters:
brokerSubQueue - the name of the non-durable subscription queue to use.

setBrokerVersion *
public void setBrokerVersion(int x) throws JMSException

Set method for brokerVersion attribute.

Parameters:
brokerVersion - the broker's version number.

setCleanupInterval * §
public void setCleanupInterval(long x) throws JMSException

Set method for cleanupInterval attribute.

Parameters:
how often the cleanup utility will run, in milliseconds

setCleanupLevel * §
public void setCleanupLevel(int x) throws JMSException

Set method for cleanupLevel attribute.

Parameters:
An integer representing one of the valid cleanupLevel values. These are represented by the constants:
JMSC.MQJMS_CLEANUP_NONE
JMSC.MQJMS_CLEANUP_SAFE
JMSC.MQJMS_CLEANUP_STRONG
JMSC.MQJMS_CLEANUP_AS_PROPERTY

setPubAckInterval * §
public void setPubAckInterval(int x)

Set method for pubAckInterval attribute.

Parameters:
pubAckInterval - the number of messages to use as interval.

setStatusRefreshInterval * §
public void setStatusRefreshInterval(int x)

Set method for statusRefreshInterval attribute.

Parameters:
statusRefreshInterval - the number of milliseconds between transactions to refresh publish/subscribe status.

setSubscriptionStore * §
public void setSubscriptionStore(int x) throws JMSException

Set method for SUBSTORE property.

Parameters:
SubStore type - an integer representing one of the valid subStore values. These are represented by the constants:
JMSC.MQJMS_SUBSTORE_QUEUE
JMSC.MQJMS_SUBSTORE_BROKER
JMSC.MQJMS_SUBSTORE_MIGRATE



© IBM Corporation 1997, 2002. All Rights Reserved