public class QueueSession extends Session implements QueueSession
javax.jms.QueueSession
interface.Session.Closer
deliveries, INDIVIDUAL_ACKNOWLEDGE, listener, logger, messageConsumerListeners, messageListener, sendings, trace, tracker, transacted
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
Constructor and Description |
---|
QueueSession(Connection cnx,
boolean transacted,
int acknowledgeMode,
RequestMultiplexer mtpx)
Constructs a queue session.
|
acknowledge, acknowledge, addConsumer, addMessageListener, addProducer, checkClosed, checkConsumers, checkThread, close, closeBrowser, closeConsumer, closeProducer, commit, createBrowser, createBrowser, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createQueue, createStreamMessage, createTemporaryQueue, createTextMessage, createTextMessage, doClose, getAcknowledgeMode, getCompressedMinSize, getCompressionLevel, getConnection, getId, getJMXBeanName, getMessageConsumerListener, getMessageListener, getQueueMessageReadMax, getRequestMultiplexer, getRequestStatus, getSessionMode, getStatus, getTopicAckBufferMax, getTopicActivationThreshold, getTopicPassivationThreshold, getTransacted, isAsyncSend, isAsyncSub, isAutoAck, isImplicitAck, isStarted, onMessage, onMessage, pushMessages, putMessageConsumerListener, receive, recover, registerMBean, removeMessageConsumerListener, removeMessageListener, rollback, run, send, setAsyncSend, setAsyncSub, setCompressedMinSize, setCompressionLevel, setImplicitAck, setMessageConsumerListener, setMessageListener, setQueueMessageReadMax, setTopicAckBufferMax, setTopicActivationThreshold, setTopicPassivationThreshold, setTransacted, start, stop, syncRequest, toString, unregisterMBean
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createBrowser, createBrowser, createQueue, createTemporaryQueue
close, commit, createBytesMessage, createConsumer, createConsumer, createConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createStreamMessage, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, getTransacted, recover, rollback, run, setMessageListener
QueueSession(Connection cnx, boolean transacted, int acknowledgeMode, RequestMultiplexer mtpx) throws JMSException
cnx
- The connection the session belongs to.transacted
- true
for a transacted session.acknowledgeMode
- 1 (auto), 2 (client) or 3 (dups ok).JMSException
- In case of an invalid acknowledge mode.public QueueSender createSender(Queue queue) throws JMSException
createSender
in interface QueueSession
queue
- the queue to send to, or null if this is a sender which does
not have a specified destination.IllegalStateException
- If the session is closed or if the
connection is broken.JMSException
- If the creation fails for any other reason.public QueueReceiver createReceiver(Queue queue, String selector) throws JMSException
createReceiver
in interface QueueSession
queue
- the queue to access.selector
- The selector allowing to filter messages.IllegalStateException
- If the session is closed or if the
connection is broken.JMSException
- If the creation fails for any other reason.public QueueReceiver createReceiver(Queue queue) throws JMSException
createReceiver
in interface QueueSession
queue
- the queue to access.IllegalStateException
- If the session is closed or if the
connection is broken.JMSException
- If the creation fails for any other reason.public TopicSubscriber createDurableSubscriber(Topic topic, String name, String selector, boolean noLocal) throws JMSException
createDurableSubscriber
in interface Session
createDurableSubscriber
in class Session
topic
- the non-temporary Topic to subscribe to.name
- the name used to identify this subscription.selector
- The selector allowing to filter messages. A value of null or an empty string
indicates that there is no message selector for the message consumer.noLocal
- if true, inhibits the delivery of messages published by its own connection.IllegalStateException
- Systematically.InvalidDestinationException
- if an invalid destination is specified.JMSException
- If the creation fails for any other reason.public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException
createDurableSubscriber
in interface Session
createDurableSubscriber
in class Session
topic
- the non-temporary Topic to subscribe to.name
- the name used to identify this subscription.IllegalStateException
- Systematically.InvalidDestinationException
- if an invalid destination is specified.JMSException
- If the creation fails for any other reason.public Topic createTopic(String topicName) throws JMSException
createTopic
in interface Session
createTopic
in class Session
topicName
- the name of this topic.IllegalStateException
- Systematically.JMSException
- If the topic creation failed.Topic
public TemporaryTopic createTemporaryTopic() throws JMSException
createTemporaryTopic
in interface Session
createTemporaryTopic
in class Session
IllegalStateException
- Systematically.JMSException
- If the request fails for any other reason.TemporaryTopic
public void unsubscribe(String name) throws JMSException
unsubscribe
in interface Session
unsubscribe
in interface SessionMBean
unsubscribe
in class Session
name
- the name used to identify this subscription.IllegalStateException
- Systematically.InvalidDestinationException
- If the subscription does not
exist.JMSException
- If the request fails for any other reason.public MessageConsumer createSharedConsumer(Topic topic, String name) throws JMSException
createSharedConsumer
in class Session
JMSException
public MessageConsumer createSharedConsumer(Topic topic, String name, String selector) throws JMSException
createSharedConsumer
in class Session
JMSException
public MessageConsumer createDurableConsumer(Topic topic, String name) throws JMSException
createDurableConsumer
in class Session
topic
- the non-temporary Topic to subscribe to.name
- the name used to identify this subscription.InvalidDestinationException
- if an invalid destination is specified.IllegalStateException
- If the session is closed or if the
connection is broken or if the client identifier is unset.JMSException
- If the creation fails for any other reason.public MessageConsumer createDurableConsumer(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException
createDurableConsumer
in class Session
topic
- the non-temporary Topic to subscribe to.name
- the name used to identify this subscription.messageSelector
- the selector used to filter incoming messages.noLocal
- if true, inhibits the delivery of messages published by its own connection.InvalidDestinationException
- if an invalid destination is specified.IllegalStateException
- If the session is closed or if the
connection is broken or if the client identifier is unset.JMSException
- If the creation fails for any other reason.public MessageConsumer createSharedDurableConsumer(Topic topic, String name) throws JMSException
createSharedDurableConsumer
in class Session
JMSException
public MessageConsumer createSharedDurableConsumer(Topic topic, String name, String selector) throws JMSException
createSharedDurableConsumer
in class Session
JMSException
Copyright © 2023 ScalAgent D.T.. All rights reserved.