Package com.suse.coco.attestation
Class ProcessingThread
- java.lang.Object
-
- com.suse.coco.attestation.AbstractProcessorThread
-
- com.suse.coco.attestation.ProcessingThread
-
- All Implemented Interfaces:
java.lang.Runnable
class ProcessingThread extends AbstractProcessorThread
Main processing thread of theAttestationQueueProcessor. Extracts the attestation result of the supported types and uses the correctAttestationModuleto process them.
-
-
Field Summary
Fields Modifier and Type Field Description private intbatchSizeprivate java.lang.ObjectdataAvailableLockprivate java.util.concurrent.ExecutorServiceexecutorServiceprivate ListeningThreadlisteningThreadprivate static org.apache.logging.log4j.LoggerLOGGERprivate AttestationModuleLoadermoduleLoaderprivate AttestationResultServiceservice
-
Constructor Summary
Constructors Constructor Description ProcessingThread(AttestationResultService serviceIn, java.util.concurrent.ExecutorService executorServiceIn, AttestationModuleLoader moduleLoaderIn, int batchSizeIn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidnotifyDataAvailable()Notifies the processor that some data is ready to be processed.voidrun()voidsetListeningThread(ListeningThread listeningThreadIn)voidstart()Starts the processing of the thread.-
Methods inherited from class com.suse.coco.attestation.AbstractProcessorThread
await, isRunning, setRunning, stop
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
dataAvailableLock
private final java.lang.Object dataAvailableLock
-
moduleLoader
private final AttestationModuleLoader moduleLoader
-
service
private final AttestationResultService service
-
executorService
private final java.util.concurrent.ExecutorService executorService
-
batchSize
private final int batchSize
-
listeningThread
private ListeningThread listeningThread
-
-
Constructor Detail
-
ProcessingThread
ProcessingThread(AttestationResultService serviceIn, java.util.concurrent.ExecutorService executorServiceIn, AttestationModuleLoader moduleLoaderIn, int batchSizeIn)
-
-
Method Detail
-
setListeningThread
public void setListeningThread(ListeningThread listeningThreadIn)
-
notifyDataAvailable
public void notifyDataAvailable()
Notifies the processor that some data is ready to be processed. Used by theListeningThreadto trigger the processing after receiving a notification.
-
start
public void start()
Description copied from class:AbstractProcessorThreadStarts the processing of the thread.- Overrides:
startin classAbstractProcessorThread
-
run
public void run()
-
-