Class ShutdownHookUtils


  • public class ShutdownHookUtils
    extends java.lang.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.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addShutDownHook​(java.lang.Thread hook)  
      static void removeShutdownHook​(java.lang.Thread hook)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShutdownHookUtils

        public ShutdownHookUtils()
    • Method Detail

      • addShutDownHook

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

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