Class CompositeMessageProcessor
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.processing.pipeline.CompositeMessageProcessor
- All Implemented Interfaces:
CompositeFeedMessageProcessor,FeedMessageProcessor
The master
FeedMessageProcessor implementation that handles the flow
through the message processing pipeline-
Constructor Summary
ConstructorsConstructorDescriptionCompositeMessageProcessor(List<FeedMessageProcessor> processors) Constructs a newCompositeMessageProcessorinstance -
Method Summary
Modifier and TypeMethodDescriptionReturns the processor identifiervoidinit(FeedMessageProcessor dispatchingProcessor) Initializes and prepares the composite processor instancevoidprocessMessage(UnmarshalledMessage message, byte[] body, RoutingKeyInfo routingKeyInfo, MessageTimestamp timestamp) Starts the processing pipeline by calling thefirstProcessorvoidsetNextMessageProcessor(FeedMessageProcessor nextMessageProcessor) This method should be ignored since theCompositeMessageProcessoris the trigger/starter of the processing pipeline and can't have a successor processor
-
Constructor Details
-
CompositeMessageProcessor
Constructs a newCompositeMessageProcessorinstance- Parameters:
processors- - a completeListpipeline processors
-
-
Method Details
-
init
Initializes and prepares the composite processor instance- Specified by:
initin interfaceCompositeFeedMessageProcessor- Parameters:
dispatchingProcessor- - the final dispatching message processor
-
getProcessorId
Returns the processor identifier- Specified by:
getProcessorIdin interfaceFeedMessageProcessor- Returns:
- - the processor identifier
-
processMessage
public void processMessage(UnmarshalledMessage message, byte[] body, RoutingKeyInfo routingKeyInfo, MessageTimestamp timestamp) Starts the processing pipeline by calling thefirstProcessor- Specified by:
processMessagein interfaceFeedMessageProcessor- Parameters:
message- - the message that should be processedbody- - the raw body of the received messageroutingKeyInfo- - aRoutingKeyInfoinstance describing the message routing keytimestamp- - all message timestamps
-
setNextMessageProcessor
This method should be ignored since theCompositeMessageProcessoris the trigger/starter of the processing pipeline and can't have a successor processor- Specified by:
setNextMessageProcessorin interfaceFeedMessageProcessor- Parameters:
nextMessageProcessor- - should be ignored/not used
-