|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjuglr.Message
public class Message
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.
Actor
,
Box
,
MessageBus
Constructor Summary | |
---|---|
Message()
|
Method Summary | |
---|---|
Address |
getReplyTo()
Get the address the message recipient should reply to in case that is relevant. |
Address |
getSender()
Get the Address of the Actor responsible for sending
this message. |
Message |
setReplyTo(Address replyTo)
Set the address that the message recipient should reply to in case that is relevant. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Message()
Method Detail |
---|
public Address getSender()
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()
. Note
that it is generally advised to use getReplyTo()
instead
of this method, unless you understand what you are doing.
null
if this message has
not been sendpublic Message setReplyTo(Address replyTo)
DelegatingActor
and MulticastActor
will set the
reply-to address to that of the original sender when passing messages on
to delegates.
replyTo
- the address the message recipient should send replies to
this
public Address getReplyTo()
DelegatingActor
or MulticastActor
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |