public class TypedActor extends java.lang.Object implements ExtensionId<akka.actor.TypedActorExtension>, ExtensionIdProvider
Modifier and Type | Class and Description |
---|---|
static class |
TypedActor.MethodCall
This class represents a Method call, and has a reference to the Method to be called and the parameters to supply
It's sent to the ActorRef backing the TypedActor and can be serialized and deserialized
|
static class |
TypedActor.MethodCall$ |
static interface |
TypedActor.PostRestart |
static interface |
TypedActor.PostStop
Mix this into your TypedActor to be able to hook into its lifecycle
|
static interface |
TypedActor.PreRestart
Mix this into your TypedActor to be able to hook into its lifecycle
|
static interface |
TypedActor.PreStart
Mix this into your TypedActor to be able to hook into its lifecycle
|
static interface |
TypedActor.Receiver
Mix this into your TypedActor to be able to intercept Terminated messages
|
static class |
TypedActor.SerializedMethodCall$ |
static class |
TypedActor.SerializedTypedActorInvocationHandler$ |
static interface |
TypedActor.Supervisor
Mix this into your TypedActor to be able to define supervisor strategy
|
Constructor and Description |
---|
TypedActor() |
Modifier and Type | Method and Description |
---|---|
static akka.actor.TypedActorFactory |
apply(ActorContext context)
Returns a contextual TypedActorFactory of this extension, this means that any TypedActors created by this TypedActorExtension
will be children to the specified context, this allows for creating hierarchies of TypedActors.
|
static ActorContext |
context()
Returns the ActorContext (for a TypedActor) when inside a method call in a TypedActor.
|
static akka.actor.TypedActorExtension |
createExtension(ExtendedActorSystem system) |
static scala.concurrent.ExecutionContextExecutor |
dispatcher()
Returns the default dispatcher (for a TypedActor) when inside a method call in a TypedActor.
|
static akka.actor.TypedActorFactory |
get(ActorContext context)
Returns a contextual TypedActorFactory of this extension, this means that any TypedActors created by this TypedActorExtension
will be children to the specified context, this allows for creating hierarchies of TypedActors.
|
static akka.actor.TypedActorExtension |
get(ActorSystem system) |
static TypedActor$ |
lookup() |
static <T> T |
self()
Returns the reference to the proxy when called inside a method call in a TypedActor
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, createExtension, equals, get, hashCode
lookup
public static akka.actor.TypedActorExtension get(ActorSystem system)
public static TypedActor$ lookup()
public static akka.actor.TypedActorExtension createExtension(ExtendedActorSystem system)
public static akka.actor.TypedActorFactory apply(ActorContext context)
public static akka.actor.TypedActorFactory get(ActorContext context)
Java API
public static <T> T self()
Example:
class FooImpl extends Foo { def doFoo { val myself = TypedActor.self[Foo] } }Useful when you want to send a reference to this TypedActor to someone else.
NEVER EXPOSE "this" to someone else, always use "self[TypeOfInterface(s)]"
java.lang.IllegalStateException
- if called outside of the scope of a method on this TypedActorjava.lang.ClassCastException
- if the supplied type T isn't the type of the proxy associated with this TypedActorpublic static ActorContext context()
public static scala.concurrent.ExecutionContextExecutor dispatcher()