Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.aendvari.hermes.broker
Class MessageTopic  view MessageTopic download MessageTopic.java

java.lang.Object
  extended bycom.aendvari.hermes.broker.MessageTopic

public class MessageTopic
extends java.lang.Object

Represents a message topic. Topics may only be used with the MessageBroker they are created by.


Field Summary
protected  com.aendvari.common.osm.OsmNode node
          The leaf node that the topic refers to in the hierarchy.
protected  java.lang.String path
          The topic path.
protected  java.util.HashSet subscribers
          The subscribers to this topic.
 
Constructor Summary
  MessageTopic()
          Constructs a MessageTopic.
protected MessageTopic(com.aendvari.common.osm.OsmNode setNode)
          Constructs a MessageTopic.
 
Method Summary
protected  com.aendvari.common.osm.OsmNode getNode()
          Returns the node for this topic.
 java.lang.String getPath()
          Returns the topic path.
protected  void publish(Message message)
          Publishes the message to this topic.
protected  void setNode(com.aendvari.common.osm.OsmNode setNode)
          Sets the node for this topic.
protected  void subscribe(MessageListener listener)
          Subscribes the listener to this topic.
protected  void unsubscribe(MessageListener listener)
          Unsubscribes the listener from this topic.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

node

protected com.aendvari.common.osm.OsmNode node
The leaf node that the topic refers to in the hierarchy. This field is used by the MessageBroker for topic creation and management.


path

protected java.lang.String path
The topic path.


subscribers

protected java.util.HashSet subscribers
The subscribers to this topic.

Constructor Detail

MessageTopic

public MessageTopic()
Constructs a MessageTopic.


MessageTopic

protected MessageTopic(com.aendvari.common.osm.OsmNode setNode)
Constructs a MessageTopic.

Method Detail

getPath

public java.lang.String getPath()
Returns the topic path.


getNode

protected com.aendvari.common.osm.OsmNode getNode()
Returns the node for this topic.


setNode

protected void setNode(com.aendvari.common.osm.OsmNode setNode)
Sets the node for this topic.


subscribe

protected void subscribe(MessageListener listener)
Subscribes the listener to this topic.


unsubscribe

protected void unsubscribe(MessageListener listener)
Unsubscribes the listener from this topic.


publish

protected void publish(Message message)
Publishes the message to this topic.