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

@ -151,6 +151,18 @@ class TypedActorDocSpec extends AkkaSpec(Map("akka.loglevel" -> "INFO")) {
//#typed-actor-remote
}
"create hierarchies" in {
try {
//#typed-actor-hierarchy
//Inside your Typed Actor
val childSquarer: Squarer = TypedActor(TypedActor.context).typedActorOf(TypedProps[SquarerImpl]())
//Use "childSquarer" as a Squarer
//#typed-actor-hierarchy
} catch {
case e: Exception //ignore
}
}
"supercharge" in {
//#typed-actor-supercharge-usage
val awesomeFooBar: Foo with Bar = TypedActor(system).typedActorOf(TypedProps[FooBar]())

View file

@ -54,7 +54,7 @@ package docs.serialization {
// using the type hint (if any, see "includeManifest" above)
// into the optionally provided classLoader.
def fromBinary(bytes: Array[Byte],
clazz: Option[Class[_]]): AnyRef = {
clazz: Option[Class[_]]): AnyRef = {
// Put your code that deserializes here
//#...
null