public class ReplaceWithFirstMessage extends MessageAggregatorImpl
MessageAggregator
that replaces the original payload with the first aggregated message.
This is primarily designed to be used where there is a one to one relationship between the original and aggregated message. No parsing is done of the first message, it is simply used as is; all other messages that are passed in as part of the collection to be aggregated are ignored.
In the adapter configuration file this class is aliased as replace-with-first-message-aggregator which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
ReplaceWithFirstMessage() |
Modifier and Type | Method and Description |
---|---|
void |
aggregate(AdaptrisMessage original,
java.lang.Iterable<AdaptrisMessage> msgs)
Joins multiple
AdaptrisMessage s into a single AdaptrisMessage
objects. |
void |
joinMessage(AdaptrisMessage msg,
java.util.Collection<AdaptrisMessage> msgs)
Joins multiple
AdaptrisMessage s into a single AdaptrisMessage
objects. |
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 msg, java.util.Collection<AdaptrisMessage> msgs) throws CoreException
MessageAggregator
Joins multiple AdaptrisMessage
s into a single AdaptrisMessage
objects. Preservation of metadata is down to the implementation.
msg
- the msg to insert all the messages intomsgs
- 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