jasongoodwin / learning-akka

Code From Learning Akka
Apache License 2.0
262 stars 166 forks source link

Questions for the code example on page 112 #5

Open clasnake opened 7 years ago

clasnake commented 7 years ago

Hey, I just went through this and for the code example on page 112:

public void postStart() {
    self().ask(new Connect(), null);
}

override def postStart = self ! connect

Shouldn't it be:

public void preStart() {
    self().tell(new Connect(), null);
}

override def preStart = self ! connect

I don't find postStart as an akka method that we can override. And the java code should use tell instead of ask. Is it a typo or am I missing anything?

Thanks