Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class SomeActor extends FSM[State, Data] {
- when(Idle) {
- case Event(GetChild, _) =>
- val child = context.actorOf(Props[ChildActor])
- sender() ! child
- stay.using(/*save state here*/)
- val getChildFuture = someRegion ! Message(id, GetChild)
- val child: ActorRef = Await.result(getChildFuture, timeout.duration).asInstanceOf[ActorRef]
- // do something with the actor ref here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement