Interface WorkerTask

All Superinterfaces:
WorkerTaskData

public interface WorkerTask extends WorkerTaskData
Provides access onto Worker Task Data and ability to set response.
  • Method Details

    • setResponse

      void setResponse(WorkerResponse response)
      Used by the Worker to set the response to the task.
    • setResponse

      void setResponse(TaskRejectedException taskRejectedException)
      Used by the Worker to reject the task
    • setResponse

      void setResponse(InvalidTaskException invalidTaskException)
      Used by the Worker to declare that the task is not valid
    • isPoison

      boolean isPoison()
      Used by the Worker to determine that a message is poison and cannot be processed by the worker as it has failed and or crashed the worker on number of occasions previously
      Returns:
      boolean if a message is poisoned