Class MQQueue

java.lang.Object
com.ibm.msg.client.jakarta.jms.internal.JmsReadablePropertyContextImpl
com.ibm.msg.client.jakarta.jms.internal.JmsPropertyContextImpl
com.ibm.msg.client.jakarta.jms.admin.JmsDestinationImpl
com.ibm.msg.client.jakarta.jms.admin.JmsJndiDestinationImpl
com.ibm.mq.jakarta.jms.MQDestination
com.ibm.mq.jakarta.jms.MQQueue
All Implemented Interfaces:
com.ibm.jakarta.jms.JMSDestination, JmsDestination, JmsPropertyContext, JmsQueue, JmsReadablePropertyContext, com.ibm.msg.client.jakarta.provider.ProviderPropertyContextCallback, jakarta.jms.Destination, jakarta.jms.Queue, Serializable, Map<String,Object>, Referenceable
Direct Known Subclasses:
MQTemporaryQueue

public class MQQueue extends MQDestination implements jakarta.jms.Queue, JmsQueue, Referenceable, 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:
  • Constructor Details

    • 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(String queueName) throws jakarta.jms.JMSException
      Creates a new MQQueue object.
      Parameters:
      queueName - is one of:
      • the name of a base IBM 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:
      jakarta.jms.JMSException - if the queue or queue manager names are invalid.
    • MQQueue

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

    • getQueueURI

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

      Clients that depend upon the name are not portable.

      Returns:
      the queue uri
    • getQueueName

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

      public String toString()
      toString returns the Queue name
      Specified by:
      toString in interface jakarta.jms.Queue
      Overrides:
      toString in class com.ibm.msg.client.jakarta.jms.admin.JmsDestinationImpl
      Returns:
      Queue name as a URI