|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bounce.message.Distributor
public class Distributor
This class is the Distributor for all messages, it distributes the messages to the topic publishers. The publishers distribute the messages to the subscribers and the subscribers handle the messages.
It keeps a hashtable of publisher per topic, every message will also be sent to all the super topic publishers.
Constructor Summary | |
---|---|
Distributor()
The constructor for the Distributor. |
Method Summary | |
---|---|
void |
distribute(Message message)
Asks the publishers to publish the message. |
Publisher |
getPublisher(Class topic)
Gets a publisher for a specific topic from the controller. |
void |
setPublisher(Class topic,
Publisher publisher)
Sets a publisher for a specific topic to the controller. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Distributor()
Method Detail |
---|
public void setPublisher(Class topic, Publisher publisher)
topic
- the type of the message to subscribe to.publisher
- the publisher that handles the message.public Publisher getPublisher(Class topic)
topic
- the topic to get a publisher for.
public void distribute(Message message)
message
- the message to publish.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |