Class NotifyingThread

  • All Implemented Interfaces:
    Runnable

    public class NotifyingThread
    extends Thread
    A Thread that notifies it's listeners about the end of the elaboration and also measures the execution time.
    Since:
    8.5.3
    Author:
    Marco Meschieri - LogicalDOC
    • Constructor Detail

      • NotifyingThread

        public NotifyingThread()
      • NotifyingThread

        public NotifyingThread​(String name)
      • NotifyingThread

        public NotifyingThread​(Runnable target,
                               String name)
    • Method Detail

      • getElapsedTime

        public long getElapsedTime()
        Gets the elapsed time since the begin of the execution until now o until the end of the thread's execution
        Returns:
        the elapsed time in milliseconds
      • isOver

        public boolean isOver()
        Checks if the thread has finished
        Returns:
        if the it has finished
      • run

        public final void run()
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread
      • doRun

        public void doRun()
                   throws Throwable
        Concrete implementations should override this method to implement their own processing.
        Throws:
        Throwable - whatever error that happens during the elaboration