Package com.github.workerframework.api
Interface WorkerTask
- All Superinterfaces:
WorkerTaskData
Provides access onto Worker Task Data and ability to set response.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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 previouslyvoid
setResponse
(InvalidTaskException invalidTaskException) Used by the Worker to declare that the task is not validvoid
setResponse
(TaskRejectedException taskRejectedException) Used by the Worker to reject the taskvoid
setResponse
(WorkerResponse response) Used by the Worker to set the response to the task.Methods inherited from interface com.github.workerframework.api.WorkerTaskData
addResponse, getClassifier, getContext, getCorrelationId, getData, getSourceInfo, getStatus, getTo, getTrackingInfo, getVersion, sendMessage
-
Method Details
-
setResponse
Used by the Worker to set the response to the task. -
setResponse
Used by the Worker to reject the task -
setResponse
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
-