cgl.narada.jms
Class JmsTopicConnectionFactory

java.lang.Object
  extended by cgl.narada.jms.JmsTopicConnectionFactory
All Implemented Interfaces:
JmsDebugFlags, ConnectionFactory, TopicConnectionFactory

public class JmsTopicConnectionFactory
extends Object
implements TopicConnectionFactory, JmsDebugFlags

This class implements the JMS connection factory. What is being done is,

  • Intitializer class, is called upon to intialize the IP address and the port number to which a connection needs to be made.
  • This Initializer class then instantiates a connection factory, that is responsible for open connections to the particular broker. The getConnection() method requests a TCP socket connection with the broker in question.


    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
    JmsTopicConnectionFactory(Properties properties, String transportType, int entityId)
               
    JmsTopicConnectionFactory(String hostName, int portNum)
               
    JmsTopicConnectionFactory(String hostName, int portNum, String transportType)
               
     
    Method Summary
     TopicConnection createTopicConnection()
               
     TopicConnection createTopicConnection(String userName, String password)
              Creates a topic connection with the specified user identity.
    static void main(String[] args)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    JmsTopicConnectionFactory

    public JmsTopicConnectionFactory(String hostName,
                                     int portNum)

    JmsTopicConnectionFactory

    public JmsTopicConnectionFactory(String hostName,
                                     int portNum,
                                     String transportType)

    JmsTopicConnectionFactory

    public JmsTopicConnectionFactory(Properties properties,
                                     String transportType,
                                     int entityId)
    Method Detail

    createTopicConnection

    public TopicConnection createTopicConnection(String userName,
                                                 String password)
                                          throws JMSException
    Creates a topic connection with the specified user identity. The connection is created in stopped mode. No messages will be delivered until the Connection.start method is explicitly called.

    Specified by:
    createTopicConnection in interface TopicConnectionFactory
    Parameters:
    userName - the caller's user name
    password - the caller's password
    Returns:
    a newly created topic connection
    Throws:
    JMSException - if the JMS provider fails to create a topic connection due to some internal error.
    JMSSecurityException - if client authentication fails due to an invalid user name or password.

    createTopicConnection

    public TopicConnection createTopicConnection()
                                          throws JMSException
    Specified by:
    createTopicConnection in interface TopicConnectionFactory
    Throws:
    JMSException

    main

    public static void main(String[] args)


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