org.apache.camel.processor.aggregate.zipfile
Class ZipAggregationStrategy

java.lang.Object
  extended by org.apache.camel.processor.aggregate.zipfile.ZipAggregationStrategy
All Implemented Interfaces:
org.apache.camel.processor.aggregate.AggregationStrategy

public class ZipAggregationStrategy
extends Object
implements org.apache.camel.processor.aggregate.AggregationStrategy

This aggregation strategy will aggregate all incoming messages into a ZIP file.

If the incoming exchanges contain GenericFileMessage file name will be taken from the body otherwise the body content will be treated as a byte array and the ZIP entry will be named using the message id.

Note: Please note that this aggregation strategy requires eager completion check to work properly.


Constructor Summary
ZipAggregationStrategy()
           
 
Method Summary
 org.apache.camel.Exchange aggregate(org.apache.camel.Exchange oldExchange, org.apache.camel.Exchange newExchange)
           
 String getFilePrefix()
          Gets the prefix used when creating the ZIP file name.
 String getFileSuffix()
          Gets the suffix used when creating the ZIP file name.
 void setFilePrefix(String filePrefix)
          Sets the prefix that will be used when creating the ZIP filename.
 void setFileSuffix(String fileSuffix)
          Sets the suffix that will be used when creating the ZIP filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZipAggregationStrategy

public ZipAggregationStrategy()
Method Detail

getFilePrefix

public String getFilePrefix()
Gets the prefix used when creating the ZIP file name.

Returns:
the prefix

setFilePrefix

public void setFilePrefix(String filePrefix)
Sets the prefix that will be used when creating the ZIP filename.

Parameters:
filePrefix - prefix to use on ZIP file.

getFileSuffix

public String getFileSuffix()
Gets the suffix used when creating the ZIP file name.

Returns:
the suffix

setFileSuffix

public void setFileSuffix(String fileSuffix)
Sets the suffix that will be used when creating the ZIP filename.

Parameters:
fileSuffix - suffix to use on ZIP file.

aggregate

public org.apache.camel.Exchange aggregate(org.apache.camel.Exchange oldExchange,
                                           org.apache.camel.Exchange newExchange)
Specified by:
aggregate in interface org.apache.camel.processor.aggregate.AggregationStrategy


Apache Camel