object Adapter
Java API: Adapters between typed and untyped actors and actor systems.
The underlying ActorSystem
is the untyped akka.actor.ActorSystem
which runs Akka Typed akka.actor.typed.Behavior on an emulation layer. In this
system typed and untyped actors can coexist.
These methods make it possible to create typed child actor from untyped
parent actor, and the opposite untyped child from typed parent.
watch
is also supported in both directions.
There are also converters (toTyped
, toClassic
) between untyped
akka.actor.ActorRef and typed akka.actor.typed.ActorRef, and between untyped
akka.actor.ActorSystem and typed akka.actor.typed.ActorSystem.
- Source
- Adapter.scala
- Alphabetic
- By Inheritance
- Adapter
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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 actorOf(ctx: ActorContext[_], props: actor.Props, name: String): actor.ActorRef
- def actorOf(ctx: ActorContext[_], props: actor.Props): actor.ActorRef
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
props[T](behavior: Creator[Behavior[T]]): actor.Props
Wrap akka.actor.typed.Behavior in an untyped akka.actor.Props, i.e.
Wrap akka.actor.typed.Behavior in an untyped akka.actor.Props, i.e. when spawning a typed child actor from an untyped parent actor. This is normally not needed because you can use the extension methods
spawn
andspawnAnonymous
with an untypedActorContext
, but it's needed when using typed actors with an existing library/tool that provides an API that takes an untyped akka.actor.Props parameter. Cluster Sharding is an example of that. -
def
props[T](behavior: Creator[Behavior[T]], deploy: Props): actor.Props
Wrap akka.actor.typed.Behavior in an untyped akka.actor.Props, i.e.
Wrap akka.actor.typed.Behavior in an untyped akka.actor.Props, i.e. when spawning a typed child actor from an untyped parent actor. This is normally not needed because you can use the extension methods
spawn
andspawnAnonymous
with an untypedActorContext
, but it's needed when using typed actors with an existing library/tool that provides an API that takes an untyped akka.actor.Props parameter. Cluster Sharding is an example of that. -
def
spawn[T](ctx: actor.ActorContext, behavior: Behavior[T], name: String, props: Props): ActorRef[T]
Spawn the given behavior as a child of the user actor in an untyped ActorContext.
Spawn the given behavior as a child of the user actor in an untyped ActorContext. Typed actors default supervision strategy is to stop. Can be overridden with
Behaviors.supervise
. -
def
spawn[T](ctx: actor.ActorContext, behavior: Behavior[T], name: String): ActorRef[T]
Spawn the given behavior as a child of the user actor in an untyped ActorContext.
Spawn the given behavior as a child of the user actor in an untyped ActorContext. Typed actors default supervision strategy is to stop. Can be overridden with
Behaviors.supervise
. -
def
spawn[T](sys: actor.ActorSystem, behavior: Behavior[T], name: String, props: Props): ActorRef[T]
Spawn the given behavior as a child of the user actor in an untyped ActorSystem.
Spawn the given behavior as a child of the user actor in an untyped ActorSystem. Typed actors default supervision strategy is to stop. Can be overridden with
Behaviors.supervise
. -
def
spawn[T](sys: actor.ActorSystem, behavior: Behavior[T], name: String): ActorRef[T]
Spawn the given behavior as a child of the user actor in an untyped ActorSystem.
Spawn the given behavior as a child of the user actor in an untyped ActorSystem. Typed actors default supervision strategy is to stop. Can be overridden with
Behaviors.supervise
. -
def
spawnAnonymous[T](ctx: actor.ActorContext, behavior: Behavior[T], props: Props): ActorRef[T]
Spawn the given behavior as a child of the user actor in an untyped ActorContext.
Spawn the given behavior as a child of the user actor in an untyped ActorContext. Typed actors default supervision strategy is to stop. Can be overridden with
Behaviors.supervise
. -
def
spawnAnonymous[T](ctx: actor.ActorContext, behavior: Behavior[T]): ActorRef[T]
Spawn the given behavior as a child of the user actor in an untyped ActorContext.
Spawn the given behavior as a child of the user actor in an untyped ActorContext. Typed actors default supervision strategy is to stop. Can be overridden with
Behaviors.supervise
. -
def
spawnAnonymous[T](sys: actor.ActorSystem, behavior: Behavior[T], props: Props): ActorRef[T]
Spawn the given behavior as a child of the user actor in an untyped ActorSystem.
Spawn the given behavior as a child of the user actor in an untyped ActorSystem. Typed actors default supervision strategy is to stop. Can be overridden with
Behaviors.supervise
. -
def
spawnAnonymous[T](sys: actor.ActorSystem, behavior: Behavior[T]): ActorRef[T]
Spawn the given behavior as a child of the user actor in an untyped ActorSystem.
Spawn the given behavior as a child of the user actor in an untyped ActorSystem. Typed actors default supervision strategy is to stop. Can be overridden with
Behaviors.supervise
. - def stop(ctx: ActorContext[_], child: actor.ActorRef): Unit
- def stop(ctx: actor.ActorContext, child: ActorRef[_]): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def toClassic(ref: ActorRef[_]): actor.ActorRef
- def toClassic(ctx: ActorContext[_]): actor.ActorContext
- def toClassic(sys: ActorSystem[_]): actor.ActorSystem
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def toTyped[T](ref: actor.ActorRef): ActorRef[T]
- def toTyped(sys: actor.ActorSystem): ActorSystem[Void]
- def unwatch[U](ctx: ActorContext[_], other: actor.ActorRef): Unit
- def unwatch[U](ctx: actor.ActorContext, other: ActorRef[U]): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def watch[U](ctx: ActorContext[_], other: actor.ActorRef): Unit
- def watch[U](ctx: actor.ActorContext, other: ActorRef[U]): Unit
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
- Deprecated
(Since version ) see corresponding Javadoc for more information.
-
def
toUntyped(ref: ActorRef[_]): actor.ActorRef
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.26) Use 'toClassic' instead
-
def
toUntyped(ctx: ActorContext[_]): actor.ActorContext
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.26) Use 'toClassic' instead
-
def
toUntyped(sys: ActorSystem[_]): actor.ActorSystem
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.26) Use 'toClassic' instead