Package akka.actor

Interface TypedActor.PreRestart

  • Enclosing class:
    TypedActor

    public static interface TypedActor.PreRestart
    Mix this into your TypedActor to be able to hook into its lifecycle
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void preRestart​(java.lang.Throwable reason, scala.Option<java.lang.Object> message)
      User overridable callback: '''By default it disposes of all children and then calls postStop().'''
    • Method Detail

      • preRestart

        void preRestart​(java.lang.Throwable reason,
                        scala.Option<java.lang.Object> message)
        User overridable callback: '''By default it disposes of all children and then calls postStop().'''
        Parameters:
        reason - the Throwable that caused the restart to happen
        message - optionally the current message the actor processed when failing, if applicable

        Is called on a crashed Actor right BEFORE it is restarted to allow clean up of resources before Actor is terminated. By default it terminates all children and calls postStop()