public class ZipWriterPipe extends CollectorPipeBase<ZipWriter,MessageZipEntry>
A chain of zipWriterPipes can be used to create a ZIP archive. You can use the pipe with different actions (see specified below).
Action CLOSE
will generate the ZIP archive which is returned as the pipe ouput.
WRITE
: the filename of the zip-entry, contents only for action=WRITE
: contents of the zip-entry, If not specified, the input is used.CollectorPipeBase.Action
parameterNamesMustBeUnique
log
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT
Constructor and Description |
---|
ZipWriterPipe() |
Modifier and Type | Method and Description |
---|---|
void |
configure()
checks for correct configuration of forward
|
protected ZipWriter |
createCollector(Message input,
PipeLineSession session) |
PipeRunResult |
doPipe(Message input,
PipeLineSession session)
This is where the action takes place.
|
void |
setBackwardsCompatibility(boolean backwardsCompatibility)
Deprecated.
|
void |
setCompleteFileHeader(boolean b)
Only for action='write': If set to
true , the fields 'crc-32', 'compressed size' and 'uncompressed size' in the zip entry file header are set explicitly (note: compression ratio is zero) |
void |
setZipWriterHandle(String string)
Deprecated.
|
addPartToCollection, closeCollector, doAction, getCollection, getParameterValueList
getParameterValue, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipe
addParameter, consumesSessionVariable, createBean, findForward, getAdapter, getEventSourceName, getForwards, getInSizeStatDummyObject, getOutSizeStatDummyObject, getParameterList, hasSizeStatistics, registerEvent, registerForward, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setMaxThreads, setName, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, start, stop, throwEvent
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getChompCharSize, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getGetInputFromFixedValue, getGetInputFromSessionKey, getLocker, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, setPipeLine, throwEvent
getMaxThreads
getName
getApplicationContext, getName
getConfigurationClassLoader
getName
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttribute
public void configure() throws ConfigurationException
FixedForwardPipe
configure
in interface IConfigurable
configure
in interface IPipe
configure
in class CollectorPipeBase<ZipWriter,MessageZipEntry>
ConfigurationException
protected ZipWriter createCollector(Message input, PipeLineSession session) throws CollectionException
createCollector
in class CollectorPipeBase<ZipWriter,MessageZipEntry>
CollectionException
public PipeRunResult doPipe(Message input, PipeLineSession session) throws PipeRunException
IPipe
FixedResultPipe
, the Pipe
can schedule the input to be closed at session exit, by calling Message.closeOnCloseOf(PipeLineSession, String)
This allows the previous Pipe to release any resources (e.g. connections) that it might have kept open
until the message was consumed. Doing so avoids connections leaking from pools, while it enables
efficient streaming processing of data while it is being read from a stream.doPipe
in interface IPipe
doPipe
in class CollectorPipeBase<ZipWriter,MessageZipEntry>
PipeRunException
@Deprecated @ConfigurationWarning(value="Replaced with attribute collectionName") public void setZipWriterHandle(String string)
public void setCompleteFileHeader(boolean b)
true
, the fields 'crc-32', 'compressed size' and 'uncompressed size' in the zip entry file header are set explicitly (note: compression ratio is zero)@Deprecated public void setBackwardsCompatibility(boolean backwardsCompatibility)
Copyright © 2023 Frank!Framework. All rights reserved.