Class SimpleSignalProgressReporter

  • All Implemented Interfaces:
    ProgressReporter, SignalReceiver

    public class SimpleSignalProgressReporter
    extends SimpleProgressReporter
    implements SignalReceiver
    This class can be used to report progress and hold signal receiver for those export plugins that download immediately. There can only be one SignalHandler registerd at a time to this class.
    Version:
    2.8
    Author:
    Martin
    • Field Detail

      • logger

        private static final org.slf4j.Logger logger
        Log signals processing.
      • notifyThread

        private Thread notifyThread
    • Constructor Detail

      • SimpleSignalProgressReporter

        public SimpleSignalProgressReporter​(ProgressReporter progress)
    • Method Detail

      • close

        public void close​(int wait)
        Description copied from interface: SignalReceiver
        Close the receiver. The receiver should close and cleanup any opened resources, unregister itself if neccesary and stop listening for signals.
        Specified by:
        close in interface SignalReceiver
        Parameters:
        wait - If the value is zero or positive, the Signal.ABORT should be sent to all registered signal handlers. The signal receiver should then wait at most the specified number of milliseconds for all signal handlers to get unregistered. If the timeout expires before all signal handlers has processed the signal, the signal receiver should continue it's shutdown.
      • sendToAll

        public void sendToAll​(SignalSender sender)
        Description copied from interface: SignalReceiver
        Let the signal sender send one or more signals to all registered signal handlers on this reciever.
        Specified by:
        sendToAll in interface SignalReceiver
        Parameters:
        sender - A signal sender implementation
      • unregisterSignalHandler

        public void unregisterSignalHandler​(SignalHandler handler)
        Description copied from interface: SignalReceiver
        Unregister a signal handler from this receiever. After this method returns, the receiver must not send any more signals to the specified handler.
        Specified by:
        unregisterSignalHandler in interface SignalReceiver
        Parameters:
        handler - The handler to unregister