Unlike the not-to-well-named receive
method, which is only called during Actor initialization to acquire the PartialFunction
that will handle incoming messages, the supervisorStrategy
method is used when failures occur. It is a regular method that does the work of deciding how to handle a failure in a descendant Actor.
Hmm... I just noticed you're using Java, so the part about receive
is presumably different for you, but the supervisorStrategy
statement still applies.