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 TypeMethodDescriptionbooleanisPoison()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 previouslyvoidsetResponse(InvalidTaskException invalidTaskException) Used by the Worker to declare that the task is not validvoidsetResponse(TaskRejectedException taskRejectedException) Used by the Worker to reject the taskvoidsetResponse(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
-