@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
<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>
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 and Description |
---|
MultiPayloadMessageAggregator() |
Modifier and Type | Method and Description |
---|---|
void |
aggregate(AdaptrisMessage original,
java.lang.Iterable<AdaptrisMessage> msgs)
Joins multiple
AdaptrisMessage 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 multiple
AdaptrisMessage s into a single MultiPayloadAdaptrisMessage object. |
void |
setReplaceOriginalMessage(java.lang.Boolean replaceOriginalMessage)
et whether to replace the original multi-payload message payload.
|
filter, filter, getFilterCondition, getOverwriteMetadata, getRetainFilterExceptionsMessages, overwriteMetadata, overwriteMetadata, setFilterCondition, setOverwriteMetadata, setRetainFilterExceptionsMessages, withOverwriteMetadata
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
collect
public void joinMessage(AdaptrisMessage original, java.util.Collection<AdaptrisMessage> messages) throws CoreException
AdaptrisMessage
s into a single MultiPayloadAdaptrisMessage object.original
- The message to insert all the messages into.messages
- The list of messages to join.CoreException
- Wrapping any other exceptionpublic void aggregate(AdaptrisMessage original, java.lang.Iterable<AdaptrisMessage> msgs) throws CoreException
MessageAggregator
Joins multiple AdaptrisMessage
s into a single AdaptrisMessage
objects. Preservation of metadata is down to the implementation.
original
- the original messagemsgs
- the list of messages to join.CoreException
public java.lang.Boolean getReplaceOriginalMessage()
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
public void setReplaceOriginalMessage(java.lang.Boolean replaceOriginalMessage)
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