Hi
How can a child actor (which itself implements FSM) be created and added as
a child to the context of a FSM actor?
Suppose the following pseudocode:
trait WorkerFSM[S, D] extends FSM[S, D]
trait ManagerFSM[S, D] extends FSM[S, D] {
// Does not work
// Create some WorkerFSM actor and add it to the children of this
ManagerFSM
def actorOf[w <: WorkerFSM[S, D]](name: String): FSM[S, D]
}
The above does not work as only the reference to ActorRed is available to
the client code. In other words, the client code cannot access the method
"actorOf".
One other alternative is to send messages to ManagerFSM. The problem is
that FSM is coupled to the given state using the construct
when(someState). But here, we would like ManagerFSM to create the child as
long as the actor is preStarted and not stopped (as dictated by Actor's
state diagram and not the fine-grained FSM state diagram).
Any ideas?
In advance, thank you very much.
Nader
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/groups/opt_out.