Adding docs about creating TypedActor children

This commit is contained in:
Viktor Klang 2012-05-25 00:49:45 +02:00
parent 681ccc6153
commit fdd4a85ab0
6 changed files with 42 additions and 6 deletions

View file

@ -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