Package fr.gouv.vitam.worker.core.impl
Class WorkerImpl
java.lang.Object
fr.gouv.vitam.worker.core.impl.WorkerImpl
- All Implemented Interfaces:
VitamAutoCloseable,Worker,AutoCloseable
WorkerImpl class implements Worker interface
manages and executes actions by step
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddActionHandler(String actionName, ActionHandler actionHandler) Add an actionhandler in the pool of actionvoidclose()get Worker Idrun(WorkerParameters workParams, Step step) Worker execute the step's actions
-
Constructor Details
-
WorkerImpl
Constructor- Parameters:
pluginLoader- the plugin loader
-
-
Method Details
-
addActionHandler
Add an actionhandler in the pool of action- Specified by:
addActionHandlerin interfaceWorker- Parameters:
actionName- action nameactionHandler- action handler- Returns:
- WorkerImpl
-
run
public ItemStatus run(WorkerParameters workParams, Step step) throws IllegalArgumentException, ProcessingException Description copied from interface:WorkerWorker execute the step's actions- Specified by:
runin interfaceWorker- Parameters:
workParams-WorkerParameters(one and only workItem will be in workParams)step-Stepnull not allowed- Returns:
- List EngineResponse
EngineResponse: list of action response {OK,KO,FATAL...} - Throws:
IllegalArgumentException- throws when arguments are nullProcessingException- throws when error in execution
-
getWorkerId
Description copied from interface:Workerget Worker Id- Specified by:
getWorkerIdin interfaceWorker- Returns:
- id
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceVitamAutoCloseable
-