public class CompositeMessageProcessor extends Object implements CompositeFeedMessageProcessor
FeedMessageProcessor
implementation that handles the flow
trough the message processing pipelineConstructor and Description |
---|
CompositeMessageProcessor(List<FeedMessageProcessor> processors)
Constructs a new
CompositeMessageProcessor instance |
Modifier and Type | Method and Description |
---|---|
String |
getProcessorId()
Returns the processor identifier
|
void |
init(FeedMessageProcessor dispatchingProcessor)
Initializes and prepares the composite processor instance
|
void |
processMessage(UnmarshalledMessage message,
byte[] body,
RoutingKeyInfo routingKeyInfo,
MessageTimestamp timestamp)
Starts the processing pipeline by calling the
firstProcessor |
void |
setNextMessageProcessor(FeedMessageProcessor nextMessageProcessor)
This method should be ignored since the
CompositeMessageProcessor is the trigger/starter
of the processing pipeline and can't have a successor processor |
public CompositeMessageProcessor(List<FeedMessageProcessor> processors)
CompositeMessageProcessor
instanceprocessors
- - a completeList
pipeline processorspublic void init(FeedMessageProcessor dispatchingProcessor)
init
in interface CompositeFeedMessageProcessor
dispatchingProcessor
- - the final dispatching message processorpublic String getProcessorId()
getProcessorId
in interface FeedMessageProcessor
public void processMessage(UnmarshalledMessage message, byte[] body, RoutingKeyInfo routingKeyInfo, MessageTimestamp timestamp)
firstProcessor
processMessage
in interface FeedMessageProcessor
message
- - the message that should be processedbody
- - the raw body of the received messageroutingKeyInfo
- - a RoutingKeyInfo
instance describing the message routing keytimestamp
- - all message timestampspublic void setNextMessageProcessor(FeedMessageProcessor nextMessageProcessor)
CompositeMessageProcessor
is the trigger/starter
of the processing pipeline and can't have a successor processorsetNextMessageProcessor
in interface FeedMessageProcessor
nextMessageProcessor
- - should be ignored/not usedCopyright © 2016–2025. All rights reserved.