Package com.suse.coco.attestation
Class AbstractProcessorThread
java.lang.Object
com.suse.coco.attestation.AbstractProcessorThread
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
ListeningThread,ProcessingThread
Base class for the threads used by the
AttestationQueueProcessor.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidawait()Wait for this thread to complete its processing.booleanCheck if this thread is currently running.protected voidsetRunning(boolean runningIn) Specify that this thread has already stopped it's processing and should not be considered as running.voidstart()Starts the processing of the thread.voidstop()Stops the processing of the thread, if it is running.
-
Field Details
-
thread
-
running
private boolean running
-
-
Constructor Details
-
AbstractProcessorThread
-
-
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
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
-