juglr
Class Message

java.lang.Object
  extended by juglr.Message
Direct Known Subclasses:
Box

public class Message
extends java.lang.Object

Abstract base class for all message types. It is recommended to use the Box class to transfer messages between actors since it guarantees "shared nothing" which is important in highly parallel computation.

If you need to send specialized messages that can not be seriliazed to simple Java types, or serialization is too expensive you can subclass this class to get what you need.

See Also:
Actor, Box, MessageBus

Constructor Summary
Message()
           
 
Method Summary
 Address getSender()
          Get the Address of the Actor responsible for sending this message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message()
Method Detail

getSender

public Address getSender()
Get the Address of the Actor responsible for sending this message. Useful for responding to messages from otherwise unknown parties. The sender address is guaranteed to be set when receiving a message in Actor.react(juglr.Message) or Actor.awaitMessage().

Returns:
the address of the sender or null if this message has not been send