cgl.narada.jms
Class JmsTopicConnection

java.lang.Object
  extended by cgl.narada.jms.JmsConnection
      extended by cgl.narada.jms.JmsTopicConnection
All Implemented Interfaces:
JmsDebugFlags, Connection, TopicConnection

public class JmsTopicConnection
extends JmsConnection
implements TopicConnection, JmsDebugFlags

This class implements the TopicConnection behavior outlined in the JMS specification.


Field Summary
 
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
JmsTopicConnection(NBJmsInterconnectionBridge nbBridge)
           
 
Method Summary
 void addToListOfManagedSessions(JmsTopicSession session)
           
 void close()
          Closes the connection.
 ConnectionConsumer createConnectionConsumer(Topic topic, String messageSelector, ServerSessionPool sessionPool, int maxMessages)
           
 ConnectionConsumer createDurableConnectionConsumer(Topic topic, String subscriptionName, String messageSelector, ServerSessionPool sessionPool, int maxMessages)
           
 TopicSession createTopicSession(boolean transacted, int acknowledgeMode)
           
 NBJmsInterconnectionBridge getNbJmsInterconnectionBridge()
           
 void processDataReceived(byte[] data)
          This is invoked by the Interconnection Bridge
 void start()
          Starts (or restarts) a connection's delivery of incoming messages.
 void stop()
          Temporarily stops a connection's delivery of incoming messages.
 
Methods inherited from class cgl.narada.jms.JmsConnection
addToListOfManagedSessions, getClientID, getExceptionListener, getMetaData, notifyExceptionListener, setClientID, setExceptionListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jms.Connection
getClientID, getExceptionListener, getMetaData, setClientID, setExceptionListener
 

Constructor Detail

JmsTopicConnection

public JmsTopicConnection(NBJmsInterconnectionBridge nbBridge)
Method Detail

getNbJmsInterconnectionBridge

public NBJmsInterconnectionBridge getNbJmsInterconnectionBridge()

createTopicSession

public TopicSession createTopicSession(boolean transacted,
                                       int acknowledgeMode)
                                throws JMSException
Specified by:
createTopicSession in interface TopicConnection
Throws:
JMSException

createConnectionConsumer

public ConnectionConsumer createConnectionConsumer(Topic topic,
                                                   String messageSelector,
                                                   ServerSessionPool sessionPool,
                                                   int maxMessages)
                                            throws JMSException
Specified by:
createConnectionConsumer in interface TopicConnection
Throws:
JMSException

createDurableConnectionConsumer

public ConnectionConsumer createDurableConnectionConsumer(Topic topic,
                                                          String subscriptionName,
                                                          String messageSelector,
                                                          ServerSessionPool sessionPool,
                                                          int maxMessages)
                                                   throws JMSException
Specified by:
createDurableConnectionConsumer in interface TopicConnection
Throws:
JMSException

start

public void start()
           throws JMSException
Starts (or restarts) a connection's delivery of incoming messages. A call to start on a connection that has already been started is ignored.

Specified by:
start in interface Connection
Overrides:
start in class JmsConnection
Throws:
JMSException - if the JMS provider fails to start message delivery due to some internal error.
See Also:
Connection.stop()

stop

public void stop()
          throws JMSException
Temporarily stops a connection's delivery of incoming messages. Delivery can be restarted using the connection's start method. When the connection is stopped, delivery to all the connection's message consumers is inhibited: synchronous receives block, and messages are not delivered to message listeners.

Specified by:
stop in interface Connection
Overrides:
stop in class JmsConnection
Throws:
JMSException - if the JMS provider fails to stop message delivery due to some internal error.
See Also:
Connection.start()

close

public void close()
           throws JMSException
Closes the connection.

Specified by:
close in interface Connection
Overrides:
close in class JmsConnection
Throws:
JMSException - if the JMS provider fails to close the connection due to some internal error. For example, a failure to release resources or to close a socket connection can cause this exception to be thrown.

addToListOfManagedSessions

public void addToListOfManagedSessions(JmsTopicSession session)

processDataReceived

public void processDataReceived(byte[] data)
This is invoked by the Interconnection Bridge



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