Websphere MQ Everyplace

com.ibm.mqe.jms
Class MQeQueueSession

java.lang.Object
  |
  +--com.ibm.mqe.jms.MQeSession
        |
        +--com.ibm.mqe.jms.MQeQueueSession
All Implemented Interfaces:
javax.jms.QueueSession, java.lang.Runnable, javax.jms.Session

public class MQeQueueSession
extends MQeSession
implements javax.jms.QueueSession

A QueueSession provides methods for creating QueueReceivers, QueueSenders and QueueBrowsers.

See Also:
Session

Field Summary
 
Fields inherited from class com.ibm.mqe.jms.MQeSession
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE
 
Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE
 
Method Summary
 javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue)
          Create a QueueBrowser to peek at the messages on the specified queue.
 javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue, java.lang.String messageSelector)
          Create a QueueBrowser to peek at the messages on the specified queue.
 javax.jms.Queue createQueue(java.lang.String queueName)
          Create a Queue given a Queue name.
 javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
          Create a QueueReceiver to receive messages from the specified queue.
 javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue, java.lang.String messageSelector)
          Create a QueueReceiver to receive messages from the specified queue.
 javax.jms.QueueSender createSender(javax.jms.Queue queue)
          Create a QueueSender to send messages to the specified queue.
 
Methods inherited from class com.ibm.mqe.jms.MQeSession
close, commit, createBytesMessage, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createStreamMessage, createTextMessage, createTextMessage, getAcknowledgementMode, getMessageListener, getTransacted, recover, rollback, setMessageListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.QueueSession
createTemporaryQueue
 
Methods inherited from interface javax.jms.Session
close, commit, createBytesMessage, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createStreamMessage, createTextMessage, createTextMessage, getMessageListener, getTransacted, recover, rollback, run, setMessageListener
 

Method Detail

createQueue

public javax.jms.Queue createQueue(java.lang.String queueName)
                            throws javax.jms.JMSException
Create a Queue given a Queue name. This allows the creation of a queue with a provider specific name. Clients that depend on this ability are not portable. Note that this method returns an instance of MQeJMSQueue, rather than MQeJMSJNDIQueue.

Specified by:
createQueue in interface javax.jms.QueueSession
Parameters:
queueName - the name of this queue
Returns:
a Queue with the given name.
Throws:
javax.jms.JMSException - if a session fails to create a queue due to some JMS error.

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue)
                                       throws javax.jms.JMSException
Create a QueueReceiver to receive messages from the specified queue.

Specified by:
createReceiver in interface javax.jms.QueueSession
Parameters:
queue - the queue to access
Returns:
a QueueReceiver
Throws:
javax.jms.JMSException - if a session fails to create a receiver due to some JMS error.
javax.jms.InvalidDestinationException - if invalid Queue specified.

createReceiver

public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue,
                                              java.lang.String messageSelector)
                                       throws javax.jms.JMSException
Create a QueueReceiver to receive messages from the specified queue.

Specified by:
createReceiver in interface javax.jms.QueueSession
Parameters:
queue - the queue to access
messageSelector - only messages with properties matching the message selector expression are delivered
Returns:
a QueueReceiver
Throws:
javax.jms.JMSException - if a session fails to create a receiver due to some JMS error.
javax.jms.InvalidDestinationException - if invalid Queue specified.
javax.jms.InvalidSelectorException - if the message selector is invalid.

createSender

public javax.jms.QueueSender createSender(javax.jms.Queue queue)
                                   throws javax.jms.JMSException
Create a QueueSender to send messages to the specified queue.

Specified by:
createSender in interface javax.jms.QueueSession
Parameters:
queue - the queue to access, or null if this is an unidentifed producer.
Returns:
a QueueSender
Throws:
javax.jms.JMSException - if a session fails to create a sender due to some JMS error.
javax.jms.InvalidDestinationException - if invalid Queue specified.

createBrowser

public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue)
                                     throws javax.jms.JMSException
Create a QueueBrowser to peek at the messages on the specified queue.

Specified by:
createBrowser in interface javax.jms.QueueSession
Parameters:
queue - the queue to access
Returns:
a QueueBrowser
Throws:
javax.jms.JMSException - if a session fails to create a browser due to some JMS error.
javax.jms.InvalidDestinationException - if invalid Queue specified.

createBrowser

public javax.jms.QueueBrowser createBrowser(javax.jms.Queue queue,
                                            java.lang.String messageSelector)
                                     throws javax.jms.JMSException
Create a QueueBrowser to peek at the messages on the specified queue.

Specified by:
createBrowser in interface javax.jms.QueueSession
Parameters:
queue - the queue to access
messageSelector - only messages with properties matching the message selector expression are delivered
Returns:
a QueueBrowser
Throws:
javax.jms.JMSException - if a session fails to create a browser due to some JMS error.
javax.jms.InvalidDestinationException - if invalid Queue specified.
javax.jms.InvalidSelectorException - if the message selector is invalid.

Websphere MQ Everyplace