In Akka I can create an actor as follows.
Akka.system(app).actorOf(Props(classOf[UnzipActor]), name="somename")
Then I am in a different class, how can I get this actor?
I can get an ActorSelection
lazy val unzip: ActorSelection =
Akka.system.actorSelection("user/" + "somename")
However, a ActorSelection
is not what I want; I want an ActorRef
. How can I get a ActorRef
?
I want to have an ActorRef
since I wish to schedule a call to an ActorRef
using the scheduler.
Akka.system(app).scheduler.schedule(
5 seconds, 60 seconds, mustBeActorRef, MessageCaseClass())