In need to create an Akka2 actor (derived from UntypedActor) as a child of an existing actor (also derived from UntypedActor). The only reference I have to the parent actor is an ActorRef. Is there any way to do this? I’d like to call the parent’s UntypedActorContext.actorOf() method, but don’t know how to get a reference to it using the Akka API. Is there a better way of accomplishing my goal?
Share
Can you change the code of the parent actor? You could for example add a handler for a message of type
Propsin your parent and create the child there. It is not possible to get the context outside of the actor class.