Package com.suse.coco.module
Class AttestationModuleLoader
java.lang.Object
com.suse.coco.module.AttestationModuleLoader
Load
AttestationModule from the classpath using Java ServiceLoader mechanism.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Loggerprivate final Map<Integer,AttestationModule> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateWorker(int resultType) Create a worker to process an attestation result of the given typeGet the supported result types, aggregated from everyAttestationModuleloaded.private static voidloadModuleMappers(org.apache.ibatis.session.Configuration config, AttestationModule module) Load Mybatis mappers into the current configurationlongLoad all the available implementations ofAttestationModulefrom the classpath.
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
workerFactoriesMap
-
-
Constructor Details
-
AttestationModuleLoader
public AttestationModuleLoader()Default constructor.
-
-
Method Details
-
loadModules
public long loadModules()Load all the available implementations ofAttestationModulefrom the classpath.- Returns:
- the number of loaded attestation modules.
-
loadModuleMappers
private static void loadModuleMappers(org.apache.ibatis.session.Configuration config, AttestationModule module) Load Mybatis mappers into the current configuration- Parameters:
config- the current mybatis configurationmodule- the attestation module
-
getSupportedResultTypes
Get the supported result types, aggregated from everyAttestationModuleloaded.- Returns:
- the set of supported result types
-
createWorker
Create a worker to process an attestation result of the given type- Parameters:
resultType- the result type of the attestation result under processing- Returns:
- a
AttestationWorkerimplementation suitable for the result type
-