@ThreadSafe public class ActorRef<T> extends Object
public static <T> ActorRef<T> wrap(T proxy)
ActorRef
s for unit testing purposes.
Warning: Never use this method in production code! This method is meant to be used
only by the Actors
class.public T tell()
actorRef.tell().theMessage(theParameters)
To avoid confusion, the proxy returned from this method should never be stored in a variable or passed as a
parameter to a method. Otherwise it can be hard to know that when you are holding the real actor object and when
a proxy to it. Though that may sometimes be warranted when interacting with actor-unaware code or if you wish to
avoid the dependency to ActorRef
.Copyright © 2011-2012. All Rights Reserved.