public class ZipAggregator extends MessageAggregatorImpl
MessageAggregator
implementation that creates single zip using each message as a file in the zip.
Use setFilenameMetadata(String)
to change the key that contains the filename to be used in the zip,
default: filename.
Each message returned by the split needs to set a value of key returned by getFilenameMetadata()
, if the
a value is not set the message will be ignored. If the filenames are not unique an exception will be thrown.
In the adapter configuration file this class is aliased as zip-aggregator which is the preferred alternative to the fully qualified classname when building your configuration.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_FILENAME_METADATA |
filterCondition, log, retainFilterExceptionsMessages
Constructor and Description |
---|
ZipAggregator() |
ZipAggregator(java.lang.String filenameMetadata) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFilenameMetadata()
Returns the metadata key which contains the respective filename.
|
void |
joinMessage(AdaptrisMessage msg,
java.util.Collection<AdaptrisMessage> msgs)
Joins multiple
AdaptrisMessage s into a single AdaptrisMessage objects. |
void |
setFilenameMetadata(java.lang.String filenameMetadata) |
filter, filter, getFilterCondition, getOverwriteMetadata, getRetainFilterExceptionsMessages, overwriteMetadata, overwriteMetadata, retainFilterExceptionsMessages, setFilterCondition, setOverwriteMetadata, setRetainFilterExceptionsMessages, withOverwriteMetadata
public static final java.lang.String DEFAULT_FILENAME_METADATA
public ZipAggregator()
public ZipAggregator(java.lang.String filenameMetadata)
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 setFilenameMetadata(java.lang.String filenameMetadata)
public java.lang.String getFilenameMetadata()