Class ShutdownNotifierComponent

    • Constructor Detail

      • ShutdownNotifierComponent

        public ShutdownNotifierComponent()
    • Method Detail

      • isOpen

        public boolean isOpen()
        Description copied from interface: ShutdownNotifier
        Determine whether the component is currently open. Will return false if we are currently closing. Checking this method should be only for information, because of the race conditions - state can change after the call. Instead just execute and try to catch ShutdownSignalException and IOException
        Specified by:
        isOpen in interface ShutdownNotifier
        Returns:
        true when component is open, false otherwise
      • setShutdownCauseIfOpen

        public boolean setShutdownCauseIfOpen​(ShutdownSignalException sse)
        Internal: this is the means of registering shutdown.
        Parameters:
        sse - the reason for the shutdown
        Returns:
        true if the component is open; false otherwise.