cgl.narada.samples.jms
Class NbChat

java.lang.Object
  extended by cgl.narada.samples.jms.NbChat
All Implemented Interfaces:
MessageListener

public class NbChat
extends Object
implements MessageListener

This program is a demonstration of the features support by the new JMS implementation and is adapted from the Chat example contained in O'Reilly's Java Message Service Book.


Constructor Summary
NbChat(Properties bridgeProperties, String transportType, int entityId, String userName)
           
 
Method Summary
 void close()
           
 void initializeChatSession(TopicConnectionFactory conFactory, String username)
           
static void main(String[] args)
           
 void onMessage(Message message)
           
 void set(TopicConnection con, TopicSession pubSess, TopicSession subSess, TopicPublisher pub, String username)
           
 void startConnection()
           
 void stopConnection()
           
 void writeMessage(String text)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NbChat

public NbChat(Properties bridgeProperties,
              String transportType,
              int entityId,
              String userName)
       throws Exception
Throws:
Exception
Method Detail

initializeChatSession

public void initializeChatSession(TopicConnectionFactory conFactory,
                                  String username)
                           throws Exception
Throws:
Exception

startConnection

public void startConnection()
                     throws JMSException
Throws:
JMSException

stopConnection

public void stopConnection()
                    throws JMSException
Throws:
JMSException

set

public void set(TopicConnection con,
                TopicSession pubSess,
                TopicSession subSess,
                TopicPublisher pub,
                String username)

onMessage

public void onMessage(Message message)
Specified by:
onMessage in interface MessageListener

writeMessage

public void writeMessage(String text)
                  throws JMSException
Throws:
JMSException

close

public void close()
           throws JMSException
Throws:
JMSException

main

public static void main(String[] args)


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