Class AbstractProcessorThread

java.lang.Object
com.suse.coco.attestation.AbstractProcessorThread
All Implemented Interfaces:
Runnable
Direct Known Subclasses:
ListeningThread, ProcessingThread

abstract class AbstractProcessorThread extends Object implements Runnable
Base class for the threads used by the AttestationQueueProcessor.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
     
    private final Thread
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Wait for this thread to complete its processing.
    boolean
    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
    Starts the processing of the thread.
    void
    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 Details

    • thread

      private final Thread thread
    • running

      private boolean running
  • Constructor Details

    • AbstractProcessorThread

      protected AbstractProcessorThread(String name)
  • Method Details

    • 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 InterruptedException
      Wait for this thread to complete its processing.
      Throws:
      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