com.ibm.mq.jms

Class MQQueue

  • java.lang.Object
    • com.ibm.msg.client.jms.internal.JmsReadablePropertyContextImpl
      • com.ibm.msg.client.jms.internal.JmsPropertyContextImpl
        • com.ibm.msg.client.jms.admin.JmsDestinationImpl
  • All Implemented Interfaces:
    com.ibm.jms.JMSDestination, JmsDestination, JmsPropertyContext, JmsQueue, JmsReadablePropertyContext, com.ibm.msg.client.provider.ProviderPropertyContextCallback, java.io.Serializable, java.util.Map<java.lang.String,java.lang.Object>, javax.jms.Destination, javax.jms.Queue, javax.naming.Referenceable
    Direct Known Subclasses:
    MQTemporaryQueue


    public class MQQueue
    extends MQDestination
    implements javax.jms.Queue, JmsQueue, javax.naming.Referenceable, java.io.Serializable
    An MQQueue object encapsulates a provider-specific queue name. It is the way that a client specifies the identity of a queue to JMS methods.
    See Also:
    Serialized Form
    • Constructor Detail

      • MQQueue

        public MQQueue()
        Creates a new MQQueue object. Note that the queue name and the queue manager name (in the case where the queue manager is not the default queue manager) must be specified before this object is used.
      • MQQueue

        public MQQueue(java.lang.String queueName)
                throws javax.jms.JMSException
        Creates a new MQQueue object.
        Parameters:
        queueName - is one of:
        • the name of a base WebSphere MQ queue - assumes default queue manager
        • a uniform resource identifier (URI). This form allows you to specify remote queues (queues on a queue manager other than the one to which you are connected). It also allows you to set the other properties contained in the object. The URI is in the form:

          queue://qmgrName/queueName [name-value pairs]

          Where:

          qmgrName
          is the name of the queue manager on which the queue resides.
          queueName
          is the name of the queue
          [name-value pairs]
          is an optional list of name-value pairs that sets the remaining Queue properties. If the name of the queue manager is omitted the queue manager to which the owning QueueConnection is connected is used.
        Throws:
        javax.jms.JMSException - if the queue or queue manager names are invalid.
      • MQQueue

        public MQQueue(java.lang.String queueManagerName,
               java.lang.String queueName)
                throws javax.jms.JMSException
        Creates a new MQQueue object.
        Parameters:
        queueManagerName - the name of the queue manager
        queueName - the name of the queue
        Throws:
        javax.jms.JMSException - if the either name is invalid.
    • Method Detail

      • getQueueURI

        public java.lang.String getQueueURI()
        Gets the URI of this queue.

        Clients that depend upon the name are not portable.

        Returns:
        the queue uri
      • getQueueName

        public java.lang.String getQueueName()
        Specified by:
        getQueueName in interface javax.jms.Queue
        Overrides:
        getQueueName in class com.ibm.msg.client.jms.admin.JmsDestinationImpl
        See Also:
        JmsDestinationImpl.getQueueName()
      • toString

        public java.lang.String toString()
        toString returns the Queue name
        Specified by:
        toString in interface javax.jms.Queue
        Overrides:
        toString in class com.ibm.msg.client.jms.admin.JmsDestinationImpl
        Returns:
        Queue name as a URI
(c) Copyright IBM Corp. 2008, 2015. All Rights Reserved.