Class ShutdownHookUtils

java.lang.Object
org.apache.maven.shared.utils.cli.ShutdownHookUtils

public class ShutdownHookUtils extends Object
A shutdown hook that does not throw any exceptions upon container startup/shutdown or security manager restrictions. Incorrect usage of the hook itself may still throw an exception.
Author:
Kristian Rosenvold
  • Constructor Details

    • ShutdownHookUtils

      public ShutdownHookUtils()
  • Method Details

    • addShutDownHook

      public static void addShutDownHook(Thread hook)
      Parameters:
      hook - The thread hook.
    • removeShutdownHook

      public static void removeShutdownHook(Thread hook)
      Parameters:
      hook - The hook which should be removed.