Interface InboundProcessor
- All Known Implementing Classes:
AbstractInboundProcessor
,BaseInboundFixLenProcessor
public interface InboundProcessor
Interface for processing inbound
Message
s. Default implementations are provided by
the Platform, for example the "Default Model CSV Processor". Additional custom implementations
can be provided and associated with inbound queues via setting a custom processor
on your inbound interface in studio.-
Method Summary
Modifier and Type Method Description void
handleResults(TaskResult taskResult, Message message, PlatformUserContext context)
After processing, handles success and error cases, typically by enqueueing a response message.TaskResult
process(Message message, GridTaskContext gridTaskContext, PlatformUserContext context)
Callback from the message queue framework to process an inbound message.
-
Method Details
-
process
TaskResult process(Message message, GridTaskContext gridTaskContext, PlatformUserContext context) throws java.lang.ExceptionCallback from the message queue framework to process an inbound message.- Parameters:
message
- Message which needs to be processedgridTaskContext
- GridTaskContext provides information about the grid task associated with the messagecontext
- value chain admin context for the queue's parent value chain- Returns:
- TaskResult indicates whether processing succeeded or failed, and whether to retry
- Throws:
java.lang.Exception
-
handleResults
void handleResults(TaskResult taskResult, Message message, PlatformUserContext context) throws java.lang.ExceptionAfter processing, handles success and error cases, typically by enqueueing a response message. The general contract for Platform's supported processors is:
If TaskResult is SUCCEED and there are no upload errors, empty success message will be enqueued to success queue If TaskResult is SUCCEED or FAILD and there are upload errors (.results file is not empty), error message will be enqueued to error queue with payloadRef pointing to error file For scenarios where extra handling is required on errors before enqueueing, override this method in the implementation class- Parameters:
taskResult
- TaskResult task result fromprocess(Message, GridTaskContext, PlatformUserContext)
message
- Processed Messagecontext
- value chain admin context for the queue's parent value chain- Throws:
java.lang.Exception
-