Actor lifecycle monitoring
We saw the typed actor being defined and created, methods getting invoked, and how to stop the actors. In the case of untyped actors we saw support for the
postStop() methods where any resource initialization and subsequent cleaning could be handled.
So, in the case of typed actors, additional hooks can be implemented by making the implementation class implement additional interfaces. These interfaces can be overridden to initialize resources on actor start and clean up resources on actor stop.
Typed actors can implement the
TypedActor.PostStop interfaces to add the additional hooks into the code.
public class Calculator implementsCalculatorInt, PreStart, ...