public class TestActorRef<T extends Actor> extends LocalActorRef
Constructor and Description |
---|
TestActorRef(ActorSystem _system,
Props _props,
ActorRef _supervisor,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
static void |
$bang(java.lang.Object message,
ActorRef sender) |
static ActorRef |
$bang$default$2(java.lang.Object message) |
protected static ActorContext |
actorContext() |
static <T extends Actor> |
apply(ActorRef supervisor,
scala.reflect.ClassTag<T> t,
ActorSystem system) |
static <T extends Actor> |
apply(ActorRef supervisor,
java.lang.String name,
scala.reflect.ClassTag<T> t,
ActorSystem system) |
static <T extends Actor> |
apply(scala.reflect.ClassTag<T> t,
ActorSystem system) |
static <T extends Actor> |
apply(scala.Function0<T> factory,
scala.reflect.ClassTag<T> evidence$1,
ActorSystem system) |
static <T extends Actor> |
apply(scala.Function0<T> factory,
java.lang.String name,
scala.reflect.ClassTag<T> evidence$2,
ActorSystem system) |
static <T extends Actor> |
apply(Props props,
ActorRef supervisor,
ActorSystem system) |
static <T extends Actor> |
apply(Props props,
ActorRef supervisor,
java.lang.String name,
ActorSystem system) |
static <T extends Actor> |
apply(Props props,
ActorSystem system) |
static <T extends Actor> |
apply(Props props,
java.lang.String name,
ActorSystem system) |
static <T extends Actor> |
apply(java.lang.String name,
scala.reflect.ClassTag<T> t,
ActorSystem system) |
static scala.collection.immutable.Iterable<ActorRef> |
children() |
static int |
compareTo(ActorRef other) |
static <T extends Actor> |
create(ActorSystem system,
Props props)
Java API: create a TestActorRef in the given system for the given props,
with a random name.
|
static <T extends Actor> |
create(ActorSystem system,
Props props,
ActorRef supervisor)
Java API: create a TestActorRef in the given system for the given props,
with the given supervisor and a random name.
|
static <T extends Actor> |
create(ActorSystem system,
Props props,
ActorRef supervisor,
java.lang.String name)
Java API: create a TestActorRef in the given system for the given props,
with the given supervisor and name.
|
static <T extends Actor> |
create(ActorSystem system,
Props props,
java.lang.String name)
Java API: create a TestActorRef in the given system for the given props,
with the given name.
|
MessageDispatcher |
dispatcher() |
static boolean |
equals(java.lang.Object that) |
static void |
forward(java.lang.Object message,
ActorContext context) |
static InternalActorRef |
getChild(scala.collection.Iterator<java.lang.String> names) |
static InternalActorRef |
getParent() |
static InternalActorRef |
getSingleChild(java.lang.String name) |
static int |
hashCode() |
abstract static boolean |
isLocal() |
static boolean |
isTerminated() |
protected ActorCell |
newActorCell(ActorSystemImpl system,
InternalActorRef ref,
Props props,
MessageDispatcher dispatcher,
InternalActorRef supervisor) |
static ActorPath |
path() |
Props |
props() |
static ActorRefProvider |
provider() |
static java.lang.String |
randomName() |
void |
receive(java.lang.Object o)
Directly inject messages into actor receive behavior.
|
void |
receive(java.lang.Object o,
ActorRef sender)
Directly inject messages into actor receive behavior.
|
static void |
restart(java.lang.Throwable cause) |
static void |
resume(java.lang.Throwable causedByFailure) |
static void |
sendSystemMessage(SystemMessage message) |
static void |
start() |
static void |
stop() |
static void |
suspend() |
static void |
tell(java.lang.Object msg,
ActorRef sender) |
java.lang.String |
toString() |
static ActorCell |
underlying() |
T |
underlyingActor()
Retrieve reference to the underlying actor, where the static type matches the factory used inside the
constructor.
|
ActorRef |
unwatch(ActorRef subject)
Unregisters this actor from being a death monitor of the provided ActorRef
This means that this actor will not get a Terminated()-message when the provided actor
is permanently terminated.
|
ActorRef |
watch(ActorRef subject)
Registers this actor to be a death monitor of the provided ActorRef
This means that this actor will get a Terminated()-message when the provided actor
is permanently terminated.
|
protected static java.lang.Object |
writeReplace() |
actorContext, children, getChild, getParent, getSingleChild, isTerminated, path, provider, restart, resume, sendSystemMessage, start, stop, suspend, underlying, writeReplace
isLocal
compareTo, equals, forward, hashCode, noSender, tell
public TestActorRef(ActorSystem _system, Props _props, ActorRef _supervisor, java.lang.String name)
public static java.lang.String randomName()
public static <T extends Actor> TestActorRef<T> apply(scala.Function0<T> factory, scala.reflect.ClassTag<T> evidence$1, ActorSystem system)
public static <T extends Actor> TestActorRef<T> apply(scala.Function0<T> factory, java.lang.String name, scala.reflect.ClassTag<T> evidence$2, ActorSystem system)
public static <T extends Actor> TestActorRef<T> apply(Props props, ActorSystem system)
public static <T extends Actor> TestActorRef<T> apply(Props props, java.lang.String name, ActorSystem system)
public static <T extends Actor> TestActorRef<T> apply(Props props, ActorRef supervisor, ActorSystem system)
public static <T extends Actor> TestActorRef<T> apply(Props props, ActorRef supervisor, java.lang.String name, ActorSystem system)
public static <T extends Actor> TestActorRef<T> apply(scala.reflect.ClassTag<T> t, ActorSystem system)
public static <T extends Actor> TestActorRef<T> apply(java.lang.String name, scala.reflect.ClassTag<T> t, ActorSystem system)
public static <T extends Actor> TestActorRef<T> apply(ActorRef supervisor, scala.reflect.ClassTag<T> t, ActorSystem system)
public static <T extends Actor> TestActorRef<T> apply(ActorRef supervisor, java.lang.String name, scala.reflect.ClassTag<T> t, ActorSystem system)
public static <T extends Actor> TestActorRef<T> create(ActorSystem system, Props props, ActorRef supervisor, java.lang.String name)
system
- (undocumented)props
- (undocumented)supervisor
- (undocumented)name
- (undocumented)public static <T extends Actor> TestActorRef<T> create(ActorSystem system, Props props, ActorRef supervisor)
system
- (undocumented)props
- (undocumented)supervisor
- (undocumented)public static <T extends Actor> TestActorRef<T> create(ActorSystem system, Props props, java.lang.String name)
system
- (undocumented)props
- (undocumented)name
- (undocumented)public static <T extends Actor> TestActorRef<T> create(ActorSystem system, Props props)
system
- (undocumented)props
- (undocumented)public static final int compareTo(ActorRef other)
public static final void tell(java.lang.Object msg, ActorRef sender)
public static void forward(java.lang.Object message, ActorContext context)
public static final int hashCode()
public static final boolean equals(java.lang.Object that)
public abstract static boolean isLocal()
public static ActorPath path()
protected static ActorContext actorContext()
public static boolean isTerminated()
public static void start()
public static void suspend()
public static void resume(java.lang.Throwable causedByFailure)
public static void stop()
public static InternalActorRef getParent()
public static ActorRefProvider provider()
public static scala.collection.immutable.Iterable<ActorRef> children()
public static InternalActorRef getSingleChild(java.lang.String name)
public static InternalActorRef getChild(scala.collection.Iterator<java.lang.String> names)
public static ActorCell underlying()
public static void sendSystemMessage(SystemMessage message)
public static void $bang(java.lang.Object message, ActorRef sender)
public static void restart(java.lang.Throwable cause)
protected static java.lang.Object writeReplace() throws java.io.ObjectStreamException
java.io.ObjectStreamException
public static ActorRef $bang$default$2(java.lang.Object message)
public Props props()
public MessageDispatcher dispatcher()
protected ActorCell newActorCell(ActorSystemImpl system, InternalActorRef ref, Props props, MessageDispatcher dispatcher, InternalActorRef supervisor)
newActorCell
in class LocalActorRef
public void receive(java.lang.Object o)
o
- (undocumented)public void receive(java.lang.Object o, ActorRef sender)
o
- (undocumented)sender
- (undocumented)public T underlyingActor()
public ActorRef watch(ActorRef subject)
subject
- (undocumented)public ActorRef unwatch(ActorRef subject)
subject
- (undocumented)