cgl.narada.samples.jms
Class Chat
java.lang.Object
cgl.narada.samples.jms.Chat
- All Implemented Interfaces:
- MessageListener
public class Chat
- 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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Chat
public Chat(Properties connectionProperties,
String transportType,
String userName)
throws Exception
- Throws:
Exception
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
unsubscribe
public void unsubscribe()
subscribe
public void subscribe()
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