Skip to content

Commit

Permalink
documentation: clarify how the child actor get its name (#6693)
Browse files Browse the repository at this point in the history
- this confused me a lot when I saw that the key is passed twice.
  • Loading branch information
rethab authored and gmethvin committed Nov 3, 2016
1 parent a145341 commit 12d02be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -78,7 +78,7 @@ Now, the actor that depends on this can extend [`InjectedActorSupport`](api/java

@[injectedparent](code/javaguide/akka/ParentActor.java)

It uses the `injectedChild` to create and get a reference to the child actor, passing in the key.
It uses the `injectedChild` to create and get a reference to the child actor, passing in the key. The second parameter (`key` in this example) will be used as the child actor's name.

Finally, we need to bind our actors. In our module, we use the `bindActorFactory` method to bind the parent actor, and also bind the child factory to the child implementation:

Expand Down
Expand Up @@ -78,7 +78,7 @@ Now, the actor that depends on this can extend [`InjectedActorSupport`](api/scal

@[injectedparent](code/ScalaAkka.scala)

It uses the `injectedChild` to create and get a reference to the child actor, passing in the key.
It uses the `injectedChild` to create and get a reference to the child actor, passing in the key. The second parameter (`key` in this example) will be used as the child actor's name.

Finally, we need to bind our actors. In our module, we use the `bindActorFactory` method to bind the parent actor, and also bind the child factory to the child implementation:

Expand Down

0 comments on commit 12d02be

Please sign in to comment.