Class AbstractSignalHandler

    • Field Detail

      • supported

        private Set<Signal> supported
        Holds the supported signals.
    • Constructor Detail

      • AbstractSignalHandler

        protected AbstractSignalHandler()
        Create a new signal handler, that initially doesn't support any signals at all.
      • AbstractSignalHandler

        protected AbstractSignalHandler​(Collection<Signal> supported)
        Create a new signal handler that supports the given signals.
        Parameters:
        supported - A collection with the signals that are initially supported. More signals can be added with addSignal(Signal)
    • Method Detail

      • supports

        public boolean supports​(Signal signal)
        Description copied from interface: SignalHandler
        Check if a given signal is supported.
        Specified by:
        supports in interface SignalHandler
        Parameters:
        signal - The signal to check
        Returns:
        TRUE if the signal is supported, FALSE otherwise
      • addSignal

        protected void addSignal​(Signal signal)
        Add a signal to the list of supported signals.
        Parameters:
        signal - The signal to add
      • removeSignal

        protected void removeSignal​(Signal signal)
        Remove a signal from the list of supported signals.
        Parameters:
        signal - The signal to remove