groovyx.gpars.actor
Class ActorMessage
java.lang.Object
groovyx.gpars.actor.ActorMessage
- All Implemented Interfaces:
- java.io.Serializable
public class ActorMessage
- extends java.lang.Object
- implements java.io.Serializable
An internal representation of received messages holding both the original message plus the sender actor reference.
This class is not intended to be use directly by users.
- Author:
- Vaclav Pech, Alex Tkachman
Date: Feb 27, 2009
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
payLoad
private java.lang.Object payLoad
sender
private MessageStream sender
ActorMessage
public ActorMessage(java.lang.Object payLoad,
MessageStream sender)
- Creates a new instance
- Parameters:
payLoad
- The original messagesender
- The sending actor, null, if the message was not sent by an actor
ActorMessage
protected ActorMessage()
- Constructor for serialization
getPayLoad
public java.lang.Object getPayLoad()
getSender
public MessageStream getSender()
build
public static <T> ActorMessage build(T payLoad)
- Factory method to create instances of ActorMessage with given payload.
The sender of the ActorMessage is retrieved from the ReplyRegistry.
- Parameters:
payLoad
- The original message
- Returns:
- The newly created message
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object