Interface RunHook


public interface RunHook
The represents an object which "hooks into" play run, and is used to apply startup/cleanup actions around a play application.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Called after the play application has been started.
    default void
    Called after the play process has been stopped.
    default void
    Called before the play application is started, but after all "before run" tasks have been completed.
    default void
    Called if there was any exception thrown during play run.
  • Method Details

    • beforeStarted

      default void beforeStarted()
      Called before the play application is started, but after all "before run" tasks have been completed.
    • afterStarted

      default void afterStarted()
      Called after the play application has been started.
    • afterStopped

      default void afterStopped()
      Called after the play process has been stopped.
    • onError

      default void onError()
      Called if there was any exception thrown during play run. Useful to implement to clean up any open resources for this hook.