cgl.narada.jms
Class JmsTopicSession

java.lang.Object
  extended by cgl.narada.jms.JmsSession
      extended by cgl.narada.jms.JmsTopicSession
All Implemented Interfaces:
JmsDebugFlags, Runnable, Session, TopicSession

public class JmsTopicSession
extends JmsSession
implements TopicSession, JmsDebugFlags

This class implements the TopicSession interface outlined in the JMS specification.


Field Summary
 
Fields inherited from interface javax.jms.Session
AUTO_ACKNOWLEDGE, CLIENT_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE
 
Fields inherited from interface cgl.narada.jms.JmsDebugFlags
JmsConnection_Debug, JmsDestination_Debug, JmsHeader_Debug, JmsLogger_Debug, JmsMessage_Debug, JmsObjectMessage_Debug, JmsProperties_Debug, JmsTextMessage_Debug, JmsTopic_Debug, JmsTopicAndSelectorVerifier_Debug, JmsTopicConnection_Debug, JmsTopicConnectionFactory_Debug, JmsTopicPublisher_Debug, JmsTopicSession_Debug, JmsTopicSubscriber_Debug
 
Constructor Summary
JmsTopicSession(JmsTopicConnection jmsTopicConnection, boolean transact, int ackMode)
           
 
Method Summary
 TopicSubscriber createDurableSubscriber(Topic topic, String name)
          Creates a durable subscriber to the specified topic.
 TopicSubscriber createDurableSubscriber(Topic topic, String name, String messageSelector, boolean noLocal)
           
 TopicPublisher createPublisher(Topic topic)
           
 TopicSubscriber createSubscriber(Topic topic)
           
 TopicSubscriber createSubscriber(Topic topic, String messageSelector, boolean noLocal)
           
 TemporaryTopic createTemporaryTopic()
           
 Topic createTopic(String topicName)
           
 JmsTopicConnection getJmsTopicConnection()
           
 void routeEventToAppropriateSubscribers(JmsEvent jmsEvent)
           
 void unsubscribe(String name)
          Unsubscribes a durable subscription that has been created by a client.
 
Methods inherited from class cgl.narada.jms.JmsSession
close, commit, createBytesMessage, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createStreamMessage, createTextMessage, createTextMessage, getMessageListener, getTransacted, recover, rollback, run, setMessageListener, startSession, stopSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.Session
close, commit, createBytesMessage, createMapMessage, createMessage, createObjectMessage, createObjectMessage, createStreamMessage, createTextMessage, createTextMessage, getMessageListener, getTransacted, recover, rollback, run, setMessageListener
 

Constructor Detail

JmsTopicSession

public JmsTopicSession(JmsTopicConnection jmsTopicConnection,
                       boolean transact,
                       int ackMode)
Method Detail

createDurableSubscriber

public TopicSubscriber createDurableSubscriber(Topic topic,
                                               String name)
                                        throws JMSException
Creates a durable subscriber to the specified topic.

Specified by:
createDurableSubscriber in interface TopicSession
Parameters:
topic - the non-temporary Topic to subscribe to
name - the name used to identify this subscription
Throws:
JMSException

createDurableSubscriber

public TopicSubscriber createDurableSubscriber(Topic topic,
                                               String name,
                                               String messageSelector,
                                               boolean noLocal)
                                        throws JMSException
Specified by:
createDurableSubscriber in interface TopicSession
Throws:
JMSException

createPublisher

public TopicPublisher createPublisher(Topic topic)
                               throws JMSException
Specified by:
createPublisher in interface TopicSession
Throws:
JMSException

createSubscriber

public TopicSubscriber createSubscriber(Topic topic)
                                 throws JMSException
Specified by:
createSubscriber in interface TopicSession
Throws:
JMSException

createSubscriber

public TopicSubscriber createSubscriber(Topic topic,
                                        String messageSelector,
                                        boolean noLocal)
                                 throws JMSException
Specified by:
createSubscriber in interface TopicSession
Throws:
JMSException

createTopic

public Topic createTopic(String topicName)
                  throws JMSException
Specified by:
createTopic in interface TopicSession
Throws:
JMSException

createTemporaryTopic

public TemporaryTopic createTemporaryTopic()
                                    throws JMSException
Specified by:
createTemporaryTopic in interface TopicSession
Throws:
JMSException

unsubscribe

public void unsubscribe(String name)
                 throws JMSException
Unsubscribes a durable subscription that has been created by a client. It is erroneous for a client to delete a durable subscription while there is an active TopicSubscriber for the subscription, or while a consumed message is part of a pending transaction or has not been acknowledged in the session

Specified by:
unsubscribe in interface TopicSession
Throws:
JMSException

getJmsTopicConnection

public JmsTopicConnection getJmsTopicConnection()

routeEventToAppropriateSubscribers

public void routeEventToAppropriateSubscribers(JmsEvent jmsEvent)


For comments and suggestions please send e-mail to The NaradaBrokering Project