package adapter
Adapters between typed and classic actors and actor systems.
The underlying ActorSystem
is the classic akka.actor.ActorSystem
which runs Akka Typed akka.actor.typed.Behavior on an emulation layer. In this
system typed and classic actors can coexist.
Use these adapters with import akka.actor.typed.scaladsl.adapter._
.
Implicit extension methods are added to classic and typed ActorSystem
,
ActorContext
. Such methods make it possible to create typed child actor
from classic parent actor, and the opposite classic child from typed parent.
watch
is also supported in both directions.
There is an implicit conversion from classic akka.actor.ActorRef to typed akka.actor.typed.ActorRef.
There are also converters (toTyped
, toClassic
) from typed
akka.actor.typed.ActorRef to classic akka.actor.ActorRef, and between classic
akka.actor.ActorSystem and typed akka.actor.typed.ActorSystem.
- Source
- package.scala
- Alphabetic
- By Inheritance
- adapter
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- implicit final class ClassicActorContextOps extends AnyVal
Extension methods added to akka.actor.ActorContext.
- implicit final class ClassicActorRefOps extends AnyVal
Extension methods added to akka.actor.ActorRef.
- implicit final class ClassicActorSystemOps extends AnyVal
Extension methods added to akka.actor.ActorSystem.
- implicit final class ClassicSchedulerOps extends AnyVal
Extension methods added to akka.actor.Scheduler.
- implicit final class TypedActorContextOps extends AnyVal
Extension methods added to akka.actor.typed.scaladsl.ActorContext.
- implicit final class TypedActorRefOps extends AnyVal
Extension methods added to akka.actor.typed.ActorRef.
- implicit final class TypedActorSystemOps extends AnyVal
Extension methods added to akka.actor.typed.ActorSystem.
- implicit final class TypedSchedulerOps extends AnyVal
Extension methods added to akka.actor.typed.Scheduler.
Value Members
- implicit def actorRefAdapter[T](ref: actor.ActorRef): ActorRef[T]
Implicit conversion from classic akka.actor.ActorRef to akka.actor.typed.ActorRef.
- object PropsAdapter
Wrap akka.actor.typed.Behavior in a classic akka.actor.Props, i.e.
Wrap akka.actor.typed.Behavior in a classic akka.actor.Props, i.e. when spawning a typed child actor from a classic parent actor. This is normally not needed because you can use the extension methods
spawn
andspawnAnonymous
on a classicActorContext
, but it's needed when using typed actors with an existing library/tool that provides an API that takes a classic akka.actor.Props parameter. Cluster Sharding is an example of that.