Interface IShutdownService


public interface IShutdownService
Shutdown service.
Author:
Stepan Roh, Polarion Software
  • Method Details

    • registerShutdownHook

      void registerShutdownHook(Runnable hook)
      Register shutdown hook.

      Does nothing if hook was already registered.

      Parameters:
      hook - shutdown hook
      Throws:
      IllegalArgumentException - if hook is null
    • unregisterShutdownHook

      void unregisterShutdownHook(Runnable hook)
      Unregister shutdown hook.

      Does nothing if hook is not registered.

      Parameters:
      hook - shutdown hook
      Throws:
      IllegalArgumentException - if hook is null
    • shutdown

      void shutdown()
      Shutdown current platform.

      Whether this method returns or not depends on implementation and configuration, however it is ensured that either shutdown was initiated, is already running or was already performed.

    • shutdown

      void shutdown(String status)
      Shutdown current platform. Status String is setted to StatusFile.

      Whether this method returns or not depends on implementation and configuration, however it is ensured that either shutdown was initiated, is already running or was already performed.

    • isPlannedShutdown

      boolean isPlannedShutdown()
      Returns true if shutdown is in progress and this shutdown was requested by user (so it is not due to an error).
      Since:
      3.8.0