Package org.apache.activemq
Class ActiveMQTopicSession
- java.lang.Object
-
- org.apache.activemq.ActiveMQTopicSession
-
- All Implemented Interfaces:
Runnable,Session,TopicSession
public class ActiveMQTopicSession extends Object implements TopicSession
A TopicSession implementation that throws IllegalStateExceptions when Queue operations are attempted but which delegates to another TopicSession for all other operations. The ActiveMQSessions implement both Topic and Queue Sessions methods but the spec states that TopicSession should throw Exceptions if queue operations are attempted on it.
-
-
Field Summary
-
Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE, SESSION_TRANSACTED
-
-
Constructor Summary
Constructors Constructor Description ActiveMQTopicSession(TopicSession next)
-
Method Summary
-
-
-
Constructor Detail
-
ActiveMQTopicSession
public ActiveMQTopicSession(TopicSession next)
-
-
Method Detail
-
close
public void close() throws JMSException- Specified by:
closein interfaceSession- Throws:
JMSException
-
commit
public void commit() throws JMSException- Specified by:
commitin interfaceSession- Throws:
JMSException
-
createBrowser
public QueueBrowser createBrowser(Queue queue) throws JMSException
- Specified by:
createBrowserin interfaceSession- Parameters:
queue-- Returns:
- Throws:
JMSException
-
createBrowser
public QueueBrowser createBrowser(Queue queue, String messageSelector) throws JMSException
- Specified by:
createBrowserin interfaceSession- Parameters:
queue-messageSelector-- Returns:
- Throws:
JMSException
-
createBytesMessage
public BytesMessage createBytesMessage() throws JMSException
- Specified by:
createBytesMessagein interfaceSession- Returns:
- Throws:
JMSException
-
createConsumer
public MessageConsumer createConsumer(Destination destination) throws JMSException
- Specified by:
createConsumerin interfaceSession- Parameters:
destination-- Returns:
- Throws:
JMSException
-
createConsumer
public MessageConsumer createConsumer(Destination destination, String messageSelector) throws JMSException
- Specified by:
createConsumerin interfaceSession- Parameters:
destination-messageSelector-- Returns:
- Throws:
JMSException
-
createConsumer
public MessageConsumer createConsumer(Destination destination, String messageSelector, boolean noLocal) throws JMSException
- Specified by:
createConsumerin interfaceSession- Parameters:
destination-messageSelector-noLocal-- Returns:
- Throws:
JMSException
-
createDurableSubscriber
public TopicSubscriber createDurableSubscriber(Topic topic, String name) throws JMSException
- Specified by:
createDurableSubscriberin interfaceSession- Specified by:
createDurableSubscriberin interfaceTopicSession- Parameters:
topic-name-- Returns:
- Throws:
JMSException
-
createDurableSubscriber
public TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal) throws JMSException
- Specified by:
createDurableSubscriberin interfaceSession- Specified by:
createDurableSubscriberin interfaceTopicSession- Parameters:
topic-name-messageSelector-noLocal-- Returns:
- Throws:
JMSException
-
createMapMessage
public MapMessage createMapMessage() throws JMSException
- Specified by:
createMapMessagein interfaceSession- Returns:
- Throws:
JMSException
-
createMessage
public Message createMessage() throws JMSException
- Specified by:
createMessagein interfaceSession- Returns:
- Throws:
JMSException
-
createObjectMessage
public ObjectMessage createObjectMessage() throws JMSException
- Specified by:
createObjectMessagein interfaceSession- Returns:
- Throws:
JMSException
-
createObjectMessage
public ObjectMessage createObjectMessage(Serializable object) throws JMSException
- Specified by:
createObjectMessagein interfaceSession- Parameters:
object-- Returns:
- Throws:
JMSException
-
createProducer
public MessageProducer createProducer(Destination destination) throws JMSException
- Specified by:
createProducerin interfaceSession- Parameters:
destination-- Returns:
- Throws:
JMSException
-
createPublisher
public TopicPublisher createPublisher(Topic topic) throws JMSException
- Specified by:
createPublisherin interfaceTopicSession- Parameters:
topic-- Returns:
- Throws:
JMSException
-
createQueue
public Queue createQueue(String queueName) throws JMSException
- Specified by:
createQueuein interfaceSession- Parameters:
queueName-- Returns:
- Throws:
JMSException
-
createStreamMessage
public StreamMessage createStreamMessage() throws JMSException
- Specified by:
createStreamMessagein interfaceSession- Returns:
- Throws:
JMSException
-
createSubscriber
public TopicSubscriber createSubscriber(Topic topic) throws JMSException
- Specified by:
createSubscriberin interfaceTopicSession- Parameters:
topic-- Returns:
- Throws:
JMSException
-
createSubscriber
public TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal) throws JMSException
- Specified by:
createSubscriberin interfaceTopicSession- Parameters:
topic-messageSelector-noLocal-- Returns:
- Throws:
JMSException
-
createTemporaryQueue
public TemporaryQueue createTemporaryQueue() throws JMSException
- Specified by:
createTemporaryQueuein interfaceSession- Returns:
- Throws:
JMSException
-
createTemporaryTopic
public TemporaryTopic createTemporaryTopic() throws JMSException
- Specified by:
createTemporaryTopicin interfaceSession- Specified by:
createTemporaryTopicin interfaceTopicSession- Returns:
- Throws:
JMSException
-
createTextMessage
public TextMessage createTextMessage() throws JMSException
- Specified by:
createTextMessagein interfaceSession- Returns:
- Throws:
JMSException
-
createTextMessage
public TextMessage createTextMessage(String text) throws JMSException
- Specified by:
createTextMessagein interfaceSession- Parameters:
text-- Returns:
- Throws:
JMSException
-
createTopic
public Topic createTopic(String topicName) throws JMSException
- Specified by:
createTopicin interfaceSession- Specified by:
createTopicin interfaceTopicSession- Parameters:
topicName-- Returns:
- Throws:
JMSException
-
getAcknowledgeMode
public int getAcknowledgeMode() throws JMSException- Specified by:
getAcknowledgeModein interfaceSession- Returns:
- Throws:
JMSException
-
getMessageListener
public MessageListener getMessageListener() throws JMSException
- Specified by:
getMessageListenerin interfaceSession- Returns:
- Throws:
JMSException
-
getTransacted
public boolean getTransacted() throws JMSException- Specified by:
getTransactedin interfaceSession- Returns:
- Throws:
JMSException
-
recover
public void recover() throws JMSException- Specified by:
recoverin interfaceSession- Throws:
JMSException
-
rollback
public void rollback() throws JMSException- Specified by:
rollbackin interfaceSession- Throws:
JMSException
-
run
public void run()
-
setMessageListener
public void setMessageListener(MessageListener listener) throws JMSException
- Specified by:
setMessageListenerin interfaceSession- Parameters:
listener-- Throws:
JMSException
-
unsubscribe
public void unsubscribe(String name) throws JMSException
- Specified by:
unsubscribein interfaceSession- Specified by:
unsubscribein interfaceTopicSession- Parameters:
name-- Throws:
JMSException
-
getNext
public TopicSession getNext()
-
-