Interface ShutdownCommencingEvent

All Superinterfaces:
MMEvent

public interface ShutdownCommencingEvent extends MMEvent
This event posts when the user requests the program to shut down.

It gives subscribers the opportunity to cancel shutdown (ideally only to ensure that data can be saved or other similarly-critical decisions).

All subscribers must first check if the shutdown has been canceled by calling isCanceled(). If the shutdown has been canceled, the event must be ignored.

The default implementation of this event posts on the Studio event bus, so subscribe using EventManager.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Cancel shutdown.
    boolean
    Deprecated.
    use isCanceled() instead
    boolean
    Return whether or not shutdown has been canceled.
  • Method Details

    • cancelShutdown

      void cancelShutdown()
      Cancel shutdown.
    • isCanceled

      boolean isCanceled()
      Return whether or not shutdown has been canceled.
      Returns:
      true when shutdown was canceled
    • getIsCancelled

      @Deprecated boolean getIsCancelled()
      Deprecated.
      use isCanceled() instead
      Deprecated.
      Returns:
      true when shutdown was canceled