Class MultiPayloadMessageAggregator
- java.lang.Object
-
- com.adaptris.core.services.aggregator.MessageAggregatorImpl
-
- com.adaptris.core.services.aggregator.MultiPayloadMessageAggregator
-
- All Implemented Interfaces:
MessageAggregator
@ComponentProfile(summary="Combine many Adaptris messages into a single multi-payload message with each payload separate", tag="multi-payload,aggregator", since="3.10") public class MultiPayloadMessageAggregator extends MessageAggregatorImpl
Combine multiple standard Adaptris messages into a single multi-payload Adaptris message.<split-join-service> <unique-id>split-join-id</unique-id> <service class="shared-service"> <lookup-name>for-each-service-list-id</lookup-name> <unique-id>for-each-service-list-id</unique-id> </service> <splitter class="multi-payload-splitter"/> <aggregator class="multi-payload-aggregator"> <replace-original-message>false</replace-original-message> </aggregator> </split-join-service>
- Since:
- 3.10
- See Also:
MultiPayloadAdaptrisMessage
In the adapter configuration file this class is aliased as multi-payload-aggregator which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description MultiPayloadMessageAggregator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
aggregate(AdaptrisMessage original, java.lang.Iterable<AdaptrisMessage> msgs)
Joins multipleAdaptrisMessage
s into a single AdaptrisMessage objects.java.lang.Boolean
getReplaceOriginalMessage()
et whether to replace the original multi-payload message payload.void
joinMessage(AdaptrisMessage original, java.util.Collection<AdaptrisMessage> messages)
Joins multipleAdaptrisMessage
s into a single MultiPayloadAdaptrisMessage object.void
setReplaceOriginalMessage(java.lang.Boolean replaceOriginalMessage)
et whether to replace the original multi-payload message payload.-
Methods inherited from class com.adaptris.core.services.aggregator.MessageAggregatorImpl
filter, filter, getFilterCondition, getOverwriteMetadata, getRetainFilterExceptionsMessages, overwriteMetadata, overwriteMetadata, setFilterCondition, setOverwriteMetadata, setRetainFilterExceptionsMessages, withOverwriteMetadata
-
-
-
-
Method Detail
-
joinMessage
public void joinMessage(AdaptrisMessage original, java.util.Collection<AdaptrisMessage> messages) throws CoreException
Joins multipleAdaptrisMessage
s into a single MultiPayloadAdaptrisMessage object.- Parameters:
original
- The message to insert all the messages into.messages
- The list of messages to join.- Throws:
CoreException
- Wrapping any other exception
-
aggregate
public void aggregate(AdaptrisMessage original, java.lang.Iterable<AdaptrisMessage> msgs) throws CoreException
Description copied from interface:MessageAggregator
Joins multiple
AdaptrisMessage
s into a single AdaptrisMessage objects. Preservation of metadata is down to the implementation.- Parameters:
original
- the original messagemsgs
- the list of messages to join.- Throws:
CoreException
-
getReplaceOriginalMessage
public java.lang.Boolean getReplaceOriginalMessage()
et whether to replace the original multi-payload message payload.If true then the original message will only contain the payloads from the collection of messages, otherwise it will append the collection of messages while maintaining the original message payload; default is true unless otherwise specified
-
setReplaceOriginalMessage
public void setReplaceOriginalMessage(java.lang.Boolean replaceOriginalMessage)
et whether to replace the original multi-payload message payload.If true then the original message will only contain the payloads from the collection of messages, otherwise it will append the collection of messages while maintaining the original message payload; default is true unless otherwise specified
-
-