Adding docs about creating TypedActor children
This commit is contained in:
parent
681ccc6153
commit
fdd4a85ab0
6 changed files with 42 additions and 6 deletions
|
|
@ -5,6 +5,7 @@ package docs.actor;
|
|||
|
||||
//#imports
|
||||
|
||||
import akka.actor.TypedActor;
|
||||
import akka.dispatch.*;
|
||||
import akka.actor.*;
|
||||
import akka.japi.*;
|
||||
|
|
@ -151,6 +152,21 @@ public class TypedActorDocTestBase {
|
|||
}
|
||||
}
|
||||
|
||||
@Test public void createHierarchies() {
|
||||
try {
|
||||
//#typed-actor-hierarchy
|
||||
Squarer childSquarer =
|
||||
TypedActor.get(TypedActor.context()).
|
||||
typedActorOf(
|
||||
new TypedProps<SquarerImpl>(Squarer.class, SquarerImpl.class)
|
||||
);
|
||||
//Use "childSquarer" as a Squarer
|
||||
//#typed-actor-hierarchy
|
||||
} catch (Exception e) {
|
||||
//dun care
|
||||
}
|
||||
}
|
||||
|
||||
@Test public void proxyAnyActorRef() {
|
||||
try {
|
||||
//#typed-actor-remote
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue