hhms
Class TopicSession

java.lang.Object
  extended byhhms.TopicSession

public class TopicSession
extends java.lang.Object

TopicSession is the medium class for using Light Weight Message Service (LWMS). User application initiantes a TopicSession per Topic and must implements MessageListener interface to receive message.

Title: TopicSession

Copyright: Copyright (c) 2004

Company: CommunityGrids Labs at Indiana University

See Also:
MessageListener

Constructor Summary
TopicSession(ConnHandler conn)
          Class Constructor
 
Method Summary
 void publish(Message message)
          Publish message to the topic
 void setMessageListener(MessageListener obj)
          Set this Object as a MessageListener
 void setPublisher(java.lang.String topic)
          Set Publisher to the topic
 void setPubSub(java.lang.String topic)
          Set Subscriber and Publisher to the topic
 void setSubscriber(java.lang.String topic)
          Set Subscriber to the topic
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopicSession

public TopicSession(ConnHandler conn)
Class Constructor

Parameters:
conn - ConnHandler object that wraps ConnectionHandlers
Method Detail

publish

public void publish(Message message)
Publish message to the topic

Parameters:
message - a message to publish

setMessageListener

public void setMessageListener(MessageListener obj)
Set this Object as a MessageListener

Parameters:
obj - MessageListener

setPublisher

public void setPublisher(java.lang.String topic)
Set Publisher to the topic

Parameters:
topic - topic to publish messages

setSubscriber

public void setSubscriber(java.lang.String topic)
Set Subscriber to the topic

Parameters:
topic - topic to publish messages

setPubSub

public void setPubSub(java.lang.String topic)
Set Subscriber and Publisher to the topic

Parameters:
topic - topic to publish messages