QueueSession
public interface QueueSession
extends Session
WebSphere MQ class: MQQueueSession
java.lang.Object | +----com.ibm.mq.jms.MQSession | +----com.ibm.mq.jms.MQQueueSessionA QueueSession provides methods to create QueueReceivers, QueueSenders, QueueBrowsers, and TemporaryQueues.
See also: Session
The following methods are inherited from MQSession:
- close
- commit
- rollback
- recover
Methods
- createBrowser
public QueueBrowser createBrowser(Queue queue) throws JMSException
Create a QueueBrowser to peek at the messages on the specified queue.
- Parameters:
- queue: the queue to access.
- Throws:
- JMSException if a session fails to create a browser because of a JMS error.
- InvalidDestinationException if a non valid queue is specified.
- createBrowser
public QueueBrowser createBrowser(Queue queue, java.lang.String messageSelector) throws JMSException
Create a QueueBrowser to peek at the messages on the specified queue.
- Parameters:
- queue: the queue to access.
- messageSelector: only deliver messages with properties that match the message selector expression.
- Throws:
- JMSException if a session fails to create a browser because of a JMS error.
- InvalidDestinationException if a non valid queue is specified.
- InvalidSelectorException if the message selector is not valid.
- createQueue
public Queue createQueue(java.lang.String queueName) throws JMSException
Create a queue with a queue name. This allows the creation of a queue with a provider-specific name. The string takes a URI format, as described on topic (JMSURI).
- Note:
- Clients that depend on this ability are not portable.
- Parameters:
- queueName: the name of this queue.
- Returns:
- A queue with the given name.
- Throws:
- JMSException if a session fails to create a queue because of a JMS error.
- createReceiver
public QueueReceiver createReceiver(Queue queue) throws JMSException
Create a QueueReceiver to receive messages from the specified queue.
- Parameters:
- queue: the queue to access.
- Throws:
- JMSException if a session fails to create a receiver because of a JMS error.
- InvalidDestinationException if a non valid queue is specified.
- createReceiver
public QueueReceiver createReceiver(Queue queue, java.lang.String messageSelector) throws JMSException
Create a QueueReceiver to receive messages from the specified queue.
- Parameters:
- queue: the queue to access.
- messageSelector: only messages with properties that match the message selector expression are delivered.
- Throws:
- JMSException if a session fails to create a receiver because of a JMS error.
- InvalidDestinationException if a non valid queue is specified.
- InvalidSelectorException if the message selector is not valid.
- createSender
public QueueSender createSender(Queue queue) throws JMSException
Create a QueueSender to send messages to the specified queue.
- Parameters:
- queue: the queue to access, or null if this is to be an unidentified producer.
- Throws:
- JMSException if a session fails to create a sender because of a JMS error.
- InvalidDestinationException if a non valid queue is specified.
- createTemporaryQueue
public TemporaryQueue createTemporaryQueue() throws JMSException
Create a temporary queue. Its lifetime is that of the QueueConnection unless deleted earlier.
- Returns:
- A temporary queue.
- Throws:
- JMSException if a session fails to create a temporary queue because of a JMS error.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.