!act,doc #3831 Adding more Java with Lambda documentation and support

* The Java with Lambda support documentation for AbstractActor and AbstractFSM are now on par with Scala
* Many small fixes and additions of missing things
* Added an AbstractActorContext that has convenience functions for getChild and getChildren
This commit is contained in:
Björn Antonsson 2014-02-21 12:43:30 +01:00
parent 8396e923cf
commit 0dcb6d6654
34 changed files with 2494 additions and 211 deletions

View file

@ -82,23 +82,6 @@ class DemoActorWrapper extends Actor {
def receive = Actor.emptyBehavior
}
class AnonymousActor extends Actor {
//#anonymous-actor
def receive = {
case m: DoIt =>
context.actorOf(Props(new Actor {
def receive = {
case DoIt(msg) =>
val replyMsg = doSomeDangerousWork(msg)
sender() ! replyMsg
context.stop(self)
}
def doSomeDangerousWork(msg: ImmutableMessage): String = { "done" }
})) forward m
}
//#anonymous-actor
}
class Hook extends Actor {
var child: ActorRef = _
//#preStart
@ -283,15 +266,6 @@ class ActorDocSpec extends AkkaSpec(Map("akka.loglevel" -> "INFO")) {
system.stop(myActor)
}
"creating actor with constructor" in {
//#creating-constructor
// allows passing in arguments to the MyActor constructor
val myActor = system.actorOf(Props[MyActor], name = "myactor")
//#creating-constructor
system.stop(myActor)
}
"creating a Props config" in {
//#creating-props
import akka.actor.Props