Package org.objectweb.joram.client.jms
Class TopicSession
- java.lang.Object
-
- org.objectweb.joram.client.jms.Session
-
- org.objectweb.joram.client.jms.TopicSession
-
- All Implemented Interfaces:
AutoCloseable,Runnable,Session,TopicSession,SessionMBean
public class TopicSession extends Session implements TopicSession
Implements thejavax.jms.TopicSessioninterface.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.objectweb.joram.client.jms.Session
Session.Closer
-
-
Field Summary
-
Fields inherited from class org.objectweb.joram.client.jms.Session
deliveries, INDIVIDUAL_ACKNOWLEDGE, listener, logger, messageConsumerListeners, messageListener, sendings, trace, tracker, transacted
-
Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
-
-
Constructor Summary
Constructors Constructor Description TopicSession(Connection cnx, boolean transacted, int acknowledgeMode, RequestMultiplexer mtpx)Constructs a topic session.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueueBrowsercreateBrowser(Queue queue)API method.QueueBrowsercreateBrowser(Queue queue, String selector)API method.TopicPublishercreatePublisher(Topic topic)API method.QueuecreateQueue(String queueName)API method.TopicSubscribercreateSubscriber(Topic topic)API method.TopicSubscribercreateSubscriber(Topic topic, String selector, boolean noLocal)API method.TemporaryQueuecreateTemporaryQueue()API method.-
Methods inherited from class org.objectweb.joram.client.jms.Session
acknowledge, acknowledge, addConsumer, addMessageListener, addProducer, checkClosed, checkConsumers, checkThread, close, closeBrowser, closeConsumer, closeProducer, commit, createBytesMessage, createConsumer, createConsumer, createConsumer, createDurableConsumer, createDurableConsumer, createDurableSubscriber, createDurableSubscriber, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createSharedConsumer, createSharedConsumer, createSharedDurableConsumer, createSharedDurableConsumer, createStreamMessage, createTemporaryTopic, createTextMessage, createTextMessage, createTopic, doClose, doCommit, doRollback, 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, unsubscribe
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.jms.Session
close, commit, createBytesMessage, createConsumer, createConsumer, createConsumer, createDurableConsumer, createDurableConsumer, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createProducer, createSharedConsumer, createSharedConsumer, createSharedDurableConsumer, createSharedDurableConsumer, createStreamMessage, createTextMessage, createTextMessage, getAcknowledgeMode, getMessageListener, getTransacted, recover, rollback, run, setMessageListener
-
Methods inherited from interface javax.jms.TopicSession
createDurableSubscriber, createDurableSubscriber, createTemporaryTopic, createTopic, unsubscribe
-
-
-
-
Constructor Detail
-
TopicSession
TopicSession(Connection cnx, boolean transacted, int acknowledgeMode, RequestMultiplexer mtpx) throws JMSException
Constructs a topic session.- Parameters:
cnx- The connection the session belongs to.transacted-truefor a transacted session.acknowledgeMode- 1 (auto), 2 (client) or 3 (dups ok).- Throws:
JMSException- In case of an invalid acknowledge mode.
-
-
Method Detail
-
createPublisher
public TopicPublisher createPublisher(Topic topic) throws JMSException
API method.- Specified by:
createPublisherin interfaceTopicSession- Throws:
IllegalStateException- If the session is closed or if the connection is broken.JMSException- If the creation fails for any other reason.
-
createSubscriber
public TopicSubscriber createSubscriber(Topic topic, String selector, boolean noLocal) throws JMSException
API method.- Specified by:
createSubscriberin interfaceTopicSession- Throws:
IllegalStateException- If the session is closed or if the connection is broken.JMSException- If the creation fails for any other reason.
-
createSubscriber
public TopicSubscriber createSubscriber(Topic topic) throws JMSException
API method.- Specified by:
createSubscriberin interfaceTopicSession- Throws:
IllegalStateException- If the session is closed or if the connection is broken.JMSException- If the creation fails for any other reason.
-
createBrowser
public QueueBrowser createBrowser(Queue queue, String selector) throws JMSException
API method.- Specified by:
createBrowserin interfaceSession- Overrides:
createBrowserin classSession- Parameters:
queue- the queue to browseselector- the expression allowing to filter messages- Returns:
- a newly created QueueBrowser object.
- Throws:
IllegalStateException- Systematically.JMSException
-
createBrowser
public QueueBrowser createBrowser(Queue queue) throws JMSException
API method.- Specified by:
createBrowserin interfaceSession- Overrides:
createBrowserin classSession- Parameters:
queue- the queue to browse- Returns:
- a newly created QueueBrowser object.
- Throws:
IllegalStateException- Systematically.JMSException
-
createQueue
public Queue createQueue(String queueName) throws JMSException
API method.- Specified by:
createQueuein interfaceSession- Overrides:
createQueuein classSession- Parameters:
queueName- the name of this queue.- Returns:
- a queue with the given name.
- Throws:
IllegalStateException- Systematically.JMSException- If the topic creation failed.- See Also:
Queue
-
createTemporaryQueue
public TemporaryQueue createTemporaryQueue() throws JMSException
API method.- Specified by:
createTemporaryQueuein interfaceSession- Overrides:
createTemporaryQueuein classSession- Returns:
- a temporary queue identity.
- Throws:
IllegalStateException- Systematically.JMSException- If the request fails for any other reason.- See Also:
TemporaryQueue
-
-