All Packages Class Hierarchy This Package Previous Next Index
Class uhr.core.msg.MessageDispatcher
java.lang.Object
|
+----uhr.core.msg.MessageDispatcher
- public class MessageDispatcher
- extends Object
- implements MessageReceiver
This class allows a part to dispatch (send) Messages without
knowing where they are going. It's designed to be the receiver
provided in
MessageSender.setMessageReceiver (MessageReceiver receiver).
-
MessageDispatcher(MessageRouter,
MessageSender, String)
- This constructor reqiuires the dispatcher to forward messages to
the router from the message sender.
-
receive(Message)
- Forwards the message to the router.
MessageDispatcher
public MessageDispatcher(MessageRouter router,
MessageSender sender,
String partName)
- This constructor reqiuires the dispatcher to forward messages to
the router from the message sender. This allows this class to
later call the correct router method.
- Parameters:
- router - the router wanted the sender's messages.
- sender - tne sender of the messages.
- partName - the name of the sender part.
receive
public void receive(Message message)
- Forwards the message to the router.
- Parameters:
- message - the message to forward.
All Packages Class Hierarchy This Package Previous Next Index