Interface MessageAggregator
- All Known Implementing Classes:
AppendingMessageAggregator
,IgnoreOriginalMimeAggregator
,IgnoreOriginalXmlDocumentAggregator
,MessageAggregatorImpl
,MimeAggregator
,MultiPayloadMessageAggregator
,NullMessageAggregator
,ReplaceWithFirstMessage
,XmlDocumentAggregator
,ZipAggregator
public interface MessageAggregator
Interface for creating a single
AdaptrisMessage
instance from multiple
Messages.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
aggregate
(AdaptrisMessage original, Iterable<AdaptrisMessage> msgs) Joins multipleAdaptrisMessage
s into a single AdaptrisMessage objects.static Collection<AdaptrisMessage>
collect
(Iterable<AdaptrisMessage> iter) default void
joinMessage
(AdaptrisMessage msg, Collection<AdaptrisMessage> msgs) Joins multipleAdaptrisMessage
s into a single AdaptrisMessage objects.
-
Method Details
-
joinMessage
default void joinMessage(AdaptrisMessage msg, Collection<AdaptrisMessage> msgs) throws CoreException Joins multiple
AdaptrisMessage
s into a single AdaptrisMessage objects. Preservation of metadata is down to the implementation.- Parameters:
msg
- the msg to insert all the messages intomsgs
- the list of messages to join.- Throws:
CoreException
- wrapping any other exception- Implementation Note:
- the default operation throws a
UnsupportedOperationException
.
-
aggregate
default void aggregate(AdaptrisMessage original, Iterable<AdaptrisMessage> msgs) throws CoreException, IOException 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
IOException
- Implementation Note:
- The default implementation turns the Iterable into a collection and invokes
joinMessage(AdaptrisMessage, Collection)
for backwards compatibility reasons.
-
collect
static Collection<AdaptrisMessage> collect(Iterable<AdaptrisMessage> iter) throws IOException, CoreException - Throws:
IOException
CoreException
-