Class AbstractProcessorThread

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean running  
      private java.lang.Thread thread  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractProcessorThread​(java.lang.String name)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void await()
      Wait for this thread to complete its processing.
      boolean isRunning()
      Check if this thread is currently running.
      protected void setRunning​(boolean runningIn)
      Specify that this thread has already stopped it's processing and should not be considered as running.
      void start()
      Starts the processing of the thread.
      void stop()
      Stops the processing of the thread, if it is running.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.lang.Runnable

        run
    • Field Detail

      • thread

        private final java.lang.Thread thread
      • running

        private boolean running
    • Constructor Detail

      • AbstractProcessorThread

        protected AbstractProcessorThread​(java.lang.String name)
    • Method Detail

      • start

        public void start()
        Starts the processing of the thread.
      • stop

        public void stop()
        Stops the processing of the thread, if it is running.
      • await

        public void await()
                   throws java.lang.InterruptedException
        Wait for this thread to complete its processing.
        Throws:
        java.lang.InterruptedException - when the wait is interrupted
      • isRunning

        public boolean isRunning()
        Check if this thread is currently running.
        Returns:
        true if the thread is running.
      • setRunning

        protected void setRunning​(boolean runningIn)
        Specify that this thread has already stopped it's processing and should not be considered as running.
        Parameters:
        runningIn - the new status