Package play.libs.pekko
Interface InjectedActorSupport
-
public interface InjectedActorSupport
Support for creating injected child actors.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ActorContext
context()
Context method expected to be implemented byAbstractActor
.default ActorRef
injectedChild(Supplier<Actor> create, String name)
Create an injected child actor.default ActorRef
injectedChild(Supplier<Actor> create, String name, Function<Props,Props> props)
Create an injected child actor.
-
-
-
Method Detail
-
injectedChild
default ActorRef injectedChild(Supplier<Actor> create, String name, Function<Props,Props> props)
Create an injected child actor.- Parameters:
create
- A function to create the actor.name
- The name of the actor.props
- A function to provide props for the actor. The props passed in will just describe how to create the actor, this function can be used to provide additional configuration such as router and dispatcher configuration.- Returns:
- An ActorRef for the created actor.
-
injectedChild
default ActorRef injectedChild(Supplier<Actor> create, String name)
Create an injected child actor.- Parameters:
create
- A function to create the actor.name
- The name of the actor.- Returns:
- An ActorRef for the created actor.
-
context
ActorContext context()
Context method expected to be implemented byAbstractActor
.- Returns:
- the ActorContext.
-
-