=doc #16614 Include best-practice tip on messages in companion object in docs
This commit is contained in:
parent
cedfaa35cc
commit
a8632befc6
6 changed files with 89 additions and 0 deletions
|
|
@ -130,6 +130,13 @@ a reference to its enclosing scope:
|
|||
|
||||
.. includecode:: ../../../akka-samples/akka-docs-java-lambda/src/test/java/docs/actor/ActorDocTest.java#props-factory
|
||||
|
||||
Another good practice is to declare what messages an Actor can receive
|
||||
as close to the actor definition as possible (e.g. as static classes
|
||||
inside the Actor or using other suitable class), which makes it easier to know
|
||||
what it can receive.
|
||||
|
||||
.. includecode:: ../../../akka-samples/akka-docs-java-lambda/src/test/java/docs/actor/ActorDocTest.java#messages-in-companion
|
||||
|
||||
Creating Actors with Props
|
||||
--------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue