public class WorkerImpl extends Object implements Worker
manages and executes actions by step
| Constructor and Description |
|---|
WorkerImpl(PluginLoader pluginLoader)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
WorkerImpl |
addActionHandler(String actionName,
ActionHandler actionHandler)
Add an actionhandler in the pool of action
|
void |
close() |
String |
getWorkerId()
get Worker Id
|
ItemStatus |
run(WorkerParameters workParams,
Step step)
Worker execute the step's actions
|
public WorkerImpl(PluginLoader pluginLoader)
pluginLoader - the plugin loaderpublic WorkerImpl addActionHandler(String actionName, ActionHandler actionHandler)
addActionHandler in interface WorkeractionName - action nameactionHandler - action handlerpublic ItemStatus run(WorkerParameters workParams, Step step) throws IllegalArgumentException, ProcessingException
Workerrun in interface WorkerworkParams - WorkerParameters (one and only workItem will be in workParams)step - Step null not allowedEngineResponse : list of action response {OK,KO,FATAL...}IllegalArgumentException - throws when arguments are nullHandlerNotFoundException - throws when handler not foundProcessingException - throws when error in executionpublic String getWorkerId()
WorkergetWorkerId in interface Workerpublic void close()
close in interface VitamAutoCloseableclose in interface AutoCloseableCopyright © 2021 Vitam. All rights reserved.