akka.actor
Class TypedActor$

java.lang.Object
  extended by akka.actor.TypedActor$
All Implemented Interfaces:
ExtensionId<TypedActorExtension>, ExtensionIdProvider

public class TypedActor$
extends java.lang.Object
implements ExtensionId<TypedActorExtension>, ExtensionIdProvider

This represents the TypedActor Akka Extension, access to the functionality is done through a given ActorSystem.


Field Summary
static TypedActor$ MODULE$
          Static reference to the singleton instance of this Scala object.
 
Constructor Summary
TypedActor$()
           
 
Method Summary
 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.
 ActorContext context()
          Returns the ActorContext (for a TypedActor) when inside a method call in a TypedActor.
 TypedActorExtension createExtension(ExtendedActorSystem system)
          Is used by Akka to instantiate the Extension identified by this ExtensionId, internal use only.
 scala.concurrent.ExecutionContext dispatcher()
          Returns the default dispatcher (for a TypedActor) when inside a method call in a TypedActor.
 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.
 TypedActorExtension get(ActorSystem system)
          Returns an instance of the extension identified by this ExtensionId instance.
 TypedActor$ lookup()
          Returns the canonical ExtensionId for this Extension
<T> T
self()
          Returns the reference to the proxy when called inside a method call in a TypedActor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.actor.ExtensionId
apply, equals, hashCode
 

Field Detail

MODULE$

public static final TypedActor$ MODULE$
Static reference to the singleton instance of this Scala object.

Constructor Detail

TypedActor$

public TypedActor$()
Method Detail

get

public TypedActorExtension get(ActorSystem system)
Description copied from interface: ExtensionId
Returns an instance of the extension identified by this ExtensionId instance. Java API For extensions written in Scala that are to be used used from Java also, this method should be overridden to get correct return type.

 override def get(system: ActorSystem): TheExtension = super.get(system)
 

Specified by:
get in interface ExtensionId<TypedActorExtension>

lookup

public TypedActor$ lookup()
Description copied from interface: ExtensionIdProvider
Returns the canonical ExtensionId for this Extension

Specified by:
lookup in interface ExtensionIdProvider

createExtension

public TypedActorExtension createExtension(ExtendedActorSystem system)
Description copied from interface: ExtensionId
Is used by Akka to instantiate the Extension identified by this ExtensionId, internal use only.

Specified by:
createExtension in interface ExtensionId<TypedActorExtension>

apply

public 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. Do _not_ let this instance escape the TypedActor since that will not be thread-safe.


get

public 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. Do _not_ let this instance escape the TypedActor since that will not be thread-safe.

Java API


self

public <T> T self()
Returns the reference to the proxy when called inside a method call in a TypedActor

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)]"

Throws:
java.lang.IllegalStateException - if called outside of the scope of a method on this TypedActor
java.lang.ClassCastException - if the supplied type T isn't the type of the proxy associated with this TypedActor

context

public ActorContext context()
Returns the ActorContext (for a TypedActor) when inside a method call in a TypedActor.


dispatcher

public scala.concurrent.ExecutionContext dispatcher()
Returns the default dispatcher (for a TypedActor) when inside a method call in a TypedActor.