public class QueueSession extends Session implements javax.jms.QueueSession
javax.jms.QueueSession
interface.Session.Closer
deliveries, INDIVIDUAL_ACKNOWLEDGE, listener, logger, messageConsumerListeners, messageListener, sendings, trace, transacted
Constructor and Description |
---|
QueueSession(Connection cnx,
boolean transacted,
int acknowledgeMode,
RequestMultiplexer mtpx)
Constructs a queue session.
|
Modifier and Type | Method and Description |
---|---|
javax.jms.MessageConsumer |
createDurableConsumer(javax.jms.Topic topic,
String name)
API 2.0 method.
|
javax.jms.MessageConsumer |
createDurableConsumer(javax.jms.Topic topic,
String name,
String messageSelector,
boolean noLocal)
API 2.0 method.
|
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
String name)
API method.
|
javax.jms.TopicSubscriber |
createDurableSubscriber(javax.jms.Topic topic,
String name,
String selector,
boolean noLocal)
API method.
|
javax.jms.QueueReceiver |
createReceiver(javax.jms.Queue queue)
API method.
|
javax.jms.QueueReceiver |
createReceiver(javax.jms.Queue queue,
String selector)
API method.
|
javax.jms.QueueSender |
createSender(javax.jms.Queue queue)
API method.
|
javax.jms.MessageConsumer |
createSharedConsumer(javax.jms.Topic topic,
String name)
API 2.0 method.
|
javax.jms.MessageConsumer |
createSharedConsumer(javax.jms.Topic topic,
String name,
String selector)
API 2.0 method.
|
javax.jms.MessageConsumer |
createSharedDurableConsumer(javax.jms.Topic topic,
String name)
API 2.0 method.
|
javax.jms.MessageConsumer |
createSharedDurableConsumer(javax.jms.Topic topic,
String name,
String selector)
API 2.0 method.
|
javax.jms.TemporaryTopic |
createTemporaryTopic()
API method.
|
javax.jms.Topic |
createTopic(String topicName)
API method.
|
String |
toString()
Returns a String image of this session.
|
void |
unsubscribe(String name)
API method.
|
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, 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 javax.jms.JMSException
cnx
- The connection the session belongs to.transacted
- true
for a transacted session.acknowledgeMode
- 1 (auto), 2 (client) or 3 (dups ok).javax.jms.JMSException
- In case of an invalid acknowledge mode.public String toString()
public javax.jms.QueueSender createSender(javax.jms.Queue queue) throws javax.jms.JMSException
createSender
in interface javax.jms.QueueSession
queue
- the queue to send to, or null if this is a sender which does
not have a specified destination.javax.jms.IllegalStateException
- If the session is closed or if the
connection is broken.javax.jms.JMSException
- If the creation fails for any other reason.public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue, String selector) throws javax.jms.JMSException
createReceiver
in interface javax.jms.QueueSession
queue
- the queue to access.selector
- The selector allowing to filter messages.javax.jms.IllegalStateException
- If the session is closed or if the
connection is broken.javax.jms.JMSException
- If the creation fails for any other reason.public javax.jms.QueueReceiver createReceiver(javax.jms.Queue queue) throws javax.jms.JMSException
createReceiver
in interface javax.jms.QueueSession
queue
- the queue to access.javax.jms.IllegalStateException
- If the session is closed or if the
connection is broken.javax.jms.JMSException
- If the creation fails for any other reason.public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, String name, String selector, boolean noLocal) throws javax.jms.JMSException
createDurableSubscriber
in interface javax.jms.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.javax.jms.IllegalStateException
- Systematically.javax.jms.InvalidDestinationException
- if an invalid destination is specified.javax.jms.JMSException
- If the creation fails for any other reason.public javax.jms.TopicSubscriber createDurableSubscriber(javax.jms.Topic topic, String name) throws javax.jms.JMSException
createDurableSubscriber
in interface javax.jms.Session
createDurableSubscriber
in class Session
topic
- the non-temporary Topic to subscribe to.name
- the name used to identify this subscription.javax.jms.IllegalStateException
- Systematically.javax.jms.InvalidDestinationException
- if an invalid destination is specified.javax.jms.JMSException
- If the creation fails for any other reason.public javax.jms.Topic createTopic(String topicName) throws javax.jms.JMSException
createTopic
in interface javax.jms.Session
createTopic
in class Session
topicName
- the name of this topic.javax.jms.IllegalStateException
- Systematically.javax.jms.JMSException
- If the topic creation failed.Topic
public javax.jms.TemporaryTopic createTemporaryTopic() throws javax.jms.JMSException
createTemporaryTopic
in interface javax.jms.Session
createTemporaryTopic
in class Session
javax.jms.IllegalStateException
- Systematically.javax.jms.JMSException
- If the request fails for any other reason.TemporaryTopic
public void unsubscribe(String name) throws javax.jms.JMSException
unsubscribe
in interface javax.jms.Session
unsubscribe
in interface SessionMBean
unsubscribe
in class Session
name
- the name used to identify this subscription.javax.jms.IllegalStateException
- Systematically.javax.jms.InvalidDestinationException
- If the subscription does not
exist.javax.jms.JMSException
- If the request fails for any other reason.public javax.jms.MessageConsumer createSharedConsumer(javax.jms.Topic topic, String name) throws javax.jms.JMSException
createSharedConsumer
in interface javax.jms.Session
createSharedConsumer
in class Session
javax.jms.JMSException
public javax.jms.MessageConsumer createSharedConsumer(javax.jms.Topic topic, String name, String selector) throws javax.jms.JMSException
createSharedConsumer
in interface javax.jms.Session
createSharedConsumer
in class Session
javax.jms.JMSException
public javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic, String name) throws javax.jms.JMSException
createDurableConsumer
in interface javax.jms.Session
createDurableConsumer
in class Session
topic
- the non-temporary Topic to subscribe to.name
- the name used to identify this subscription.javax.jms.InvalidDestinationException
- if an invalid destination is specified.javax.jms.IllegalStateException
- If the session is closed or if the
connection is broken or if the client identifier is unset.javax.jms.JMSException
- If the creation fails for any other reason.public javax.jms.MessageConsumer createDurableConsumer(javax.jms.Topic topic, String name, String messageSelector, boolean noLocal) throws javax.jms.JMSException
createDurableConsumer
in interface javax.jms.Session
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.javax.jms.InvalidDestinationException
- if an invalid destination is specified.javax.jms.IllegalStateException
- If the session is closed or if the
connection is broken or if the client identifier is unset.javax.jms.JMSException
- If the creation fails for any other reason.public javax.jms.MessageConsumer createSharedDurableConsumer(javax.jms.Topic topic, String name) throws javax.jms.JMSException
createSharedDurableConsumer
in interface javax.jms.Session
createSharedDurableConsumer
in class Session
javax.jms.JMSException
public javax.jms.MessageConsumer createSharedDurableConsumer(javax.jms.Topic topic, String name, String selector) throws javax.jms.JMSException
createSharedDurableConsumer
in interface javax.jms.Session
createSharedDurableConsumer
in class Session
javax.jms.JMSException
Copyright © 2018 ScalAgent D.T.. All Rights Reserved.