object TypedActor extends ExtensionId[TypedActorExtension] with ExtensionIdProvider
This represents the TypedActor Pekko Extension, access to the functionality is done through a given ActorSystem.
- Annotations
- @deprecated
- Deprecated
(Since version Akka 2.6.0) Use 'org.apache.pekko.actor.typed' API.
- Source
- TypedActor.scala
- Alphabetic
- By Inheritance
- TypedActor
- ExtensionIdProvider
- ExtensionId
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class MethodCall(method: Method, parameters: Array[AnyRef]) extends Product with Serializable
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
- trait PostRestart extends AnyRef
- trait PostStop extends AnyRef
Mix this into your TypedActor to be able to hook into its lifecycle
- trait PreRestart extends AnyRef
Mix this into your TypedActor to be able to hook into its lifecycle
- trait PreStart extends AnyRef
Mix this into your TypedActor to be able to hook into its lifecycle
- trait Receiver extends AnyRef
Mix this into your TypedActor to be able to intercept Terminated messages
- trait Supervisor extends AnyRef
Mix this into your TypedActor to be able to define supervisor strategy
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(system: ClassicActorSystemProvider): TypedActorExtension
Returns an instance of the extension identified by this ExtensionId instance.
Returns an instance of the extension identified by this ExtensionId instance.
- Definition Classes
- ExtensionId
- def apply(system: ActorSystem): TypedActorExtension
Returns an instance of the extension identified by this ExtensionId instance.
Returns an instance of the extension identified by this ExtensionId instance.
- Definition Classes
- ExtensionId
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def context: ActorContext
Returns the ActorContext (for a TypedActor) when inside a method call in a TypedActor.
- def createExtension(system: ExtendedActorSystem): TypedActorExtension
Is used by Pekko to instantiate the Extension identified by this ExtensionId, internal use only.
Is used by Pekko to instantiate the Extension identified by this ExtensionId, internal use only.
- Definition Classes
- TypedActor → ExtensionId
- implicit def dispatcher: ExecutionContextExecutor
Returns the default dispatcher (for a TypedActor) when inside a method call in a TypedActor.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def equals(other: Any): Boolean
- Definition Classes
- ExtensionId → AnyRef → Any
- def get(context: ActorContext): TypedActorFactory
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.
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
- Annotations
- @nowarn()
- def get(system: ClassicActorSystemProvider): TypedActorExtension
Returns an instance of the extension identified by this ExtensionId instance.
Returns an instance of the extension identified by this ExtensionId instance. Java API For extensions written in Scala that are to be used from Java also, this method should be overridden to get correct return type.
override def get(system: ClassicActorSystemProvider): TheExtension = super.get(system)
- Definition Classes
- TypedActor → ExtensionId
- def get(system: ActorSystem): TypedActorExtension
Returns an instance of the extension identified by this ExtensionId instance.
Returns an instance of the extension identified by this ExtensionId instance. Java API For extensions written in Scala that are to be used from Java also, this method should be overridden to get correct return type.
override def get(system: ActorSystem): TheExtension = super.get(system)
- Definition Classes
- TypedActor → ExtensionId
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def hashCode(): Int
- Definition Classes
- ExtensionId → AnyRef → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lookup: TypedActor
Returns the canonical ExtensionId for this Extension
Returns the canonical ExtensionId for this Extension
- Definition Classes
- TypedActor → ExtensionIdProvider
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def self[T <: AnyRef]: T
Returns the reference to the proxy when called inside a method call in a TypedActor
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 IllegalStateException if called outside of the scope of a method on this TypedActor.
Throws ClassCastException if the supplied type T isn't the type of the proxy associated with this TypedActor.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def apply(context: ActorContext): TypedActorFactory
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.
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.
- Annotations
- @deprecated
- Deprecated
(Since version Akka 2.6.0) Use 'org.apache.pekko.actor.typed' API.
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)