move Java code snippet into compiled class

This commit is contained in:
Roland 2012-02-06 12:59:03 +01:00
parent 96486428e1
commit 4e12b72959
2 changed files with 16 additions and 3 deletions

View file

@ -68,4 +68,18 @@ public class RouterViaProgramExample {
router3.tell(new ExampleActor.Message(i));
}
}
private class CompileCheckJavaDocsForRouting extends UntypedActor {
@Override
public void onReceive(Object o) {
//#reply-with-parent
getSender().tell("reply", getContext().parent()); // replies go to router
//#reply-with-parent
//#reply-with-self
getSender().tell("reply", getSelf()); // replies go to this actor
//#reply-with-self
}
}
}