com.ibm.mq.jms
Class MQTopic

java.lang.Object
  |
  +--com.ibm.mq.jms.MQDestination
        |
        +--com.ibm.mq.jms.MQTopic
All Implemented Interfaces:
javax.jms.Destination, JMSDestination, javax.naming.Referenceable, java.io.Serializable, javax.jms.Topic, com.ibm.disthub2.client.Topic
Direct Known Subclasses:
MQTemporaryTopic

public class MQTopic
extends MQDestination
implements javax.jms.Topic, javax.naming.Referenceable, java.io.Serializable, com.ibm.disthub2.client.Topic

An MQTopic object encapsulates a provider-specific topic name.

See Also:
Serialized Form

Field Summary
   
Method Summary
 java.lang.String getBrokerCCDurSubQueue()
          Gets the brokerCCDurSubQueue attribute
 java.lang.String getBrokerDurSubQueue()
          Gets the brokerDurSubQueue attribute
 java.lang.String getBrokerPubQueue()
          Gets the broker's publish queue name.
 java.lang.String getBrokerPubQueueManager()
          Gets the brokerQueueManager attribute
 int getBrokerVersion()
          Gets the broker version.
 int getMulticast()
          Gets the value of the multicast attribute.
 java.lang.String getTopicName()
          Gets the name of this Topic.
 boolean isTemporary()
           
 void setBrokerCCDurSubQueue(java.lang.String name)
          Sets the name of the subscriber queue for consumers, using a durable connection to the broker.
 void setBrokerDurSubQueue(java.lang.String x)
          Sets the brokerDurSubQueue attribute
 void setBrokerPubQueue(java.lang.String brokerPubQueue)
          Set method for broker publish queue attribute.
 void setBrokerPubQueueManager(java.lang.String brokerPubQueueManager)
          Sets the broker's queue manager.
 void setBrokerVersion(int brkver)
          Sets the broker version.
 void setMulticast(int multicastMode)
          Sets the value of the multicast attribute.
 java.lang.String toString()
          Returns a string representation of the Topic object.
 
Methods inherited from class com.ibm.mq.jms.MQDestination
getCCSID, getDescription, getEncoding, getExpiry, getFailIfQuiesce, getPersistence, getPriority, getProperty, getStringFromDestination, getTargetClient, setCCSID, setDescription, setEncoding, setExpiry, setFailIfQuiesce, setPersistence, setPriority, setProperty, setTargetClient
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getTopicName

public java.lang.String getTopicName()
Gets the name of this Topic.

Clients that depend upon the name are not portable.

Specified by:
getTopicName in interface javax.jms.Topic
Returns:
the Topic name

getBrokerDurSubQueue

public java.lang.String getBrokerDurSubQueue()
Gets the brokerDurSubQueue attribute

Returns:
the broker's queue name for durable subscribers

setBrokerDurSubQueue

public void setBrokerDurSubQueue(java.lang.String x)
                          throws javax.jms.JMSException
Sets the brokerDurSubQueue attribute

Parameters:
x - the name of the broker durable subscriber queue
Throws:
javax.jms.JMSException

getBrokerCCDurSubQueue

public java.lang.String getBrokerCCDurSubQueue()
Gets the brokerCCDurSubQueue attribute

Returns:
the broker's queue name for durable connection consumers

setMulticast

public void setMulticast(int multicastMode)
                  throws javax.jms.JMSException
Sets the value of the multicast attribute. Note that attributes set on the topic override those set by MQConnectionFactory.setMulticast(int).

The default setting is JMSC.MQJMS_MULTICAST_AS_CF.

Parameters:
multicastMode - the following values are possible:
Throws:
javax.jms.JMSException - if an invalid value is supplied.

getMulticast

public int getMulticast()
Gets the value of the multicast attribute. The default setting is JMSC.MQJMS_MULTICAST_AS_CF.

Returns:
the following values are possible:

setBrokerCCDurSubQueue

public void setBrokerCCDurSubQueue(java.lang.String name)
                            throws javax.jms.JMSException
Sets the name of the subscriber queue for consumers, using a durable connection to the broker.

Parameters:
name - the name of the queue.
Throws:
javax.jms.JMSException - if name is either null or not valid.

getBrokerVersion

public int getBrokerVersion()
Gets the broker version.

Returns:
the version number.

setBrokerVersion

public void setBrokerVersion(int brkver)
                      throws javax.jms.JMSException
Sets the broker version.

Parameters:
brkver - the version number. Valid numbers are:
  • JMSC.MQJMS_BROKER_V1
  • JMSC.MQJMS_BROKER_V2
Throws:
javax.jms.JMSException - if brkver is neither of the above.

toString

public java.lang.String toString()
Returns a string representation of the Topic object.

Specified by:
toString in interface javax.jms.Topic
Overrides:
toString in class java.lang.Object
Returns:
the specific identity values for this Topic.

isTemporary

public boolean isTemporary()
Specified by:
isTemporary in interface com.ibm.disthub2.client.Topic
Returns:
whether the topic is a temporary topic.

getBrokerPubQueue

public java.lang.String getBrokerPubQueue()
Gets the broker's publish queue name.

Returns:
the broker's publish queue name

setBrokerPubQueue

public void setBrokerPubQueue(java.lang.String brokerPubQueue)
                       throws javax.jms.JMSException
Set method for broker publish queue attribute.

Parameters:
brokerPubQueue - the name of the broker publish/subscribe queue. This string is trimmed to remove leading and trailing whitespace. If this string is empty following the trim operation, then the method behaves as if the supplied argument was null.
Throws:
javax.jms.JMSException - if the operation fails because of some internal error.

getBrokerPubQueueManager

public java.lang.String getBrokerPubQueueManager()
Gets the brokerQueueManager attribute

Returns:
the broker's publish queue manager's name

setBrokerPubQueueManager

public void setBrokerPubQueueManager(java.lang.String brokerPubQueueManager)
                              throws javax.jms.JMSException
Sets the broker's queue manager.

Parameters:
brokerPubQueueManager - the name of the broker's queue manager to publish on.
Throws:
javax.jms.JMSException - if the command failed due to an internal error.

(c) Copyright IBM Corp. 2005. All Rights Reserved.