Package fr.gouv.vitam.worker.core.api

# Interface Worker

All Superinterfaces:
  `AutoCloseable`, `VitamAutoCloseable`

All Known Implementing Classes:
  `WorkerImpl`

public interface Worker extends VitamAutoCloseable
Worker Interface.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Worker`
  `addActionHandler(String actionName, ActionHandler actionHandler)`
  Constructor for test.
  `String`
  `getWorkerId()`
  get Worker Id
  `ItemStatus`
  `run(WorkerParameters workParams, Step step)`
  Worker execute the step's actions

  ### Methods inherited from interface fr.gouv.vitam.common.model.VitamAutoCloseable

  `close`

- ## Method Details

  - ### run

    ItemStatus run(WorkerParameters workParams, Step step) throws IllegalArgumentException, ProcessingException
    Worker execute the step's actions
    Parameters:
      `workParams` - `WorkerParameters` (one and only workItem will be in workParams)
      `step` - `Step` null not allowed
    Returns:
      List EngineResponse `EngineResponse` : list of action response {OK,KO,FATAL...}
    Throws:
      `IllegalArgumentException` - throws when arguments are null
      `ProcessingException` - throws when error in execution

  - ### addActionHandler

    Worker addActionHandler(String actionName, ActionHandler actionHandler)
    Constructor for test.
    Parameters:
      `actionName` - action name
      `actionHandler` - action handler
    Returns:
      the worker instance

  - ### getWorkerId

    String getWorkerId()
    get Worker Id
    Returns:
      id