Package nl.nn.adapterframework.pipes
Class StringIteratorPipe
-
- All Implemented Interfaces:
HasSender
,HasTransactionAttribute
,IConfigurable
,IConfigurationAware
,IExtendedPipe
,IForwardTarget
,INamedObject
,IPipe
,IScopeProvider
,EventThrowing
,HasStatistics
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
ForEachChildElementPipe
,JdbcIteratingPipeBase
,StreamLineIteratorPipe
public class StringIteratorPipe extends IteratingPipe<String>
IteratingPipe that has Strings as items.- Author:
- Gerrit van Brakel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class nl.nn.adapterframework.pipes.IteratingPipe
IteratingPipe.ItemCallback, IteratingPipe.StopReason
-
Nested classes/interfaces inherited from class nl.nn.adapterframework.pipes.MessageSendingPipe
MessageSendingPipe.LinkMethod
-
Nested classes/interfaces inherited from interface nl.nn.adapterframework.statistics.HasStatistics
HasStatistics.Action
-
-
Field Summary
-
Fields inherited from class nl.nn.adapterframework.pipes.IteratingPipe
MAX_ITEMS_REACHED_FORWARD, msgTransformerPool, STOP_CONDITION_MET_FORWARD
-
Fields inherited from class nl.nn.adapterframework.pipes.MessageSendingPipe
INPUT_VALIDATOR_NAME_PREFIX, INPUT_VALIDATOR_NAME_SUFFIX, INPUT_WRAPPER_NAME_PREFIX, INPUT_WRAPPER_NAME_SUFFIX, MAX_RETRY_INTERVAL, MESSAGE_LOG_NAME_PREFIX, MESSAGE_LOG_NAME_SUFFIX, MIN_RETRY_INTERVAL, msgLog, OUTPUT_VALIDATOR_NAME_PREFIX, OUTPUT_VALIDATOR_NAME_SUFFIX, OUTPUT_WRAPPER_NAME_PREFIX, OUTPUT_WRAPPER_NAME_SUFFIX, PIPE_CLEAR_TIMEOUT_MONITOR_EVENT, PIPE_EXCEPTION_MONITOR_EVENT, PIPE_TIMEOUT_MONITOR_EVENT
-
Fields inherited from class nl.nn.adapterframework.pipes.AbstractPipe
parameterNamesMustBeUnique
-
Fields inherited from class nl.nn.adapterframework.core.TransactionAttributes
log
-
Fields inherited from interface nl.nn.adapterframework.core.IExtendedPipe
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT
-
-
Constructor Summary
Constructors Constructor Description StringIteratorPipe()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure()
checks for correct configuration of forwardprotected IteratingPipe.ItemCallback
createItemCallBack(PipeLineSession session, ISender sender, Writer writer)
String
getBlockPrefix()
String
getBlockSuffix()
int
getEndPosition()
protected String
getKey(String item)
String
getLinePrefix()
String
getLineSuffix()
int
getStartPosition()
int
getStringIteratorPipeBlockSize()
boolean
isCombineBlocks()
boolean
isEscapeXml()
void
setBlockPrefix(String string)
IfcombineBlocks = true
, this string is inserted at the start of each block.void
setBlockSize(int i)
Controls multiline behaviour.void
setBlockSuffix(String string)
IfcombineBlocks = true
, this string is inserted at the end of the set of lines.void
setCombineBlocks(boolean combineBlocks)
Iftrue
, all items in a block are sent at once.void
setEndPosition(int i)
IfendPosition >= startPosition
, this field contains the end position of the key in the current recordvoid
setEscapeXml(boolean escapeXml)
Escape XML characters in each itemvoid
setLinePrefix(String string)
This string is inserted at the start of each itemvoid
setLineSuffix(String string)
This string is appended at the end of each itemvoid
setStartPosition(int i)
IfstartPosition >= 0
, this field contains the start position of the key in the current record (first character is 0); A sequence of lines with the same key is put in one block and send to the sender.-
Methods inherited from class nl.nn.adapterframework.pipes.IteratingPipe
getBlockSize, getItem, getItemNoSessionKey, getIterator, getMaxChildThreads, getMaxItems, getNamespaceDefs, getOutputType, getStopConditionTp, getStopConditionXPathExpression, getStyleSheetName, getTaskExecutor, getXpathExpression, isAddInputToResult, isCloseIteratorOnExit, isCollectResults, isIgnoreExceptions, isOmitXmlDeclaration, isParallel, isRemoveDuplicates, isRemoveXmlDeclarationInResults, itemToMessage, iterateOverInput, iterateOverStatistics, sendMessage, setAddInputToResult, setCloseIteratorOnExit, setCollectResults, setIgnoreExceptions, setItemNoSessionKey, setMaxChildThreads, setMaxItems, setNamespaceDefs, setOmitXmlDeclaration, setOutputType, setParallel, setRemoveDuplicates, setRemoveXmlDeclarationInResults, setSender, setStopConditionXPathExpression, setStyleSheetName, setTaskExecutor, setXpathExpression
-
Methods inherited from class nl.nn.adapterframework.pipes.MessageSendingPipe
consumesSessionVariable, doPipe, getAuditTrailNamespaceDefs, getAuditTrailSessionKey, getAuditTrailXPath, getCheckRootTag, getCorrelationIDNamespaceDefs, getCorrelationIDSessionKey, getCorrelationIDStyleSheet, getCorrelationIDXPath, getExceptionOnResult, getHideMethod, getInputValidator, getInputWrapper, getLabelNamespaceDefs, getLabelStyleSheet, getLabelXPath, getLinkMethod, getListener, getMaxRetries, getMessageLog, getOutputValidator, getOutputWrapper, getPresumedTimeOutInterval, getResultOnTimeOut, getRetryMaxInterval, getRetryMinInterval, getRetryNamespaceDefs, getRetryXPath, getSender, getStubFilename, getTimeOutOnResult, hasSizeStatistics, increaseRetryIntervalAndWait, isCheckXmlWellFormed, isStreamResultToServlet, isUseInputForExtract, preserve, propagateName, setAuditTrailNamespaceDefs, setAuditTrailSessionKey, setAuditTrailXPath, setCheckRootTag, setCheckXmlWellFormed, setCorrelationIDNamespaceDefs, setCorrelationIDSessionKey, setCorrelationIDStyleSheet, setCorrelationIDXPath, setExceptionOnResult, setHideMethod, setHideRegex, setInputValidator, setInputWrapper, setLabelNamespaceDefs, setLabelStyleSheet, setLabelXPath, setLinkMethod, setListener, setListenerProcessor, setMaxRetries, setMessageLog, setName, setOutputValidator, setOutputWrapper, setPipeProcessor, setPresumedTimeOutInterval, setResultOnTimeOut, setRetryMaxInterval, setRetryMinInterval, setRetryNamespaceDefs, setRetryXPath, setStreamResultToServlet, setStubFilename, setStubFileName, setTimeOutOnResult, setUseInputForExtract, start, stop
-
Methods inherited from class nl.nn.adapterframework.pipes.FixedForwardPipe
getIfParam, getIfValue, getOnlyIfSessionKey, getOnlyIfValue, getParameterValue, getSuccessForward, getUnlessSessionKey, getUnlessValue, isSkipOnEmptyInput, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipe
-
Methods inherited from class nl.nn.adapterframework.pipes.AbstractPipe
addParameter, createBean, findForward, getAdapter, getApplicationContext, getChompCharSize, getConfigurationClassLoader, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getEventSourceName, getForwards, getGetInputFromFixedValue, getGetInputFromSessionKey, getHideRegex, getInSizeStatDummyObject, getLocker, getLogIntermediaryResults, getMaxThreads, getName, getOutSizeStatDummyObject, getParameterList, getPipeLine, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, registerEvent, registerForward, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setEventPublisher, setGetInputFromFixedValue, setGetInputFromSessionKey, setLocker, setLogIntermediaryResults, setMaxThreads, setPipeLine, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, throwEvent
-
Methods inherited from class nl.nn.adapterframework.core.TransactionAttributes
configureTransactionAttributes, getTransactionAttribute, getTransactionTimeout, getTxDef, isTransacted, isTransacted, setTransacted, setTransactionAttribute, setTransactionTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface nl.nn.adapterframework.core.IExtendedPipe
throwEvent
-
Methods inherited from interface nl.nn.adapterframework.core.INamedObject
getName
-
-
-
-
Method Detail
-
configure
public void configure() throws ConfigurationException
Description copied from class:FixedForwardPipe
checks for correct configuration of forward- Specified by:
configure
in interfaceIConfigurable
- Specified by:
configure
in interfaceIPipe
- Overrides:
configure
in classIteratingPipe<String>
- Throws:
ConfigurationException
-
createItemCallBack
protected IteratingPipe.ItemCallback createItemCallBack(PipeLineSession session, ISender sender, Writer writer)
- Overrides:
createItemCallBack
in classIteratingPipe<String>
-
setBlockSize
public void setBlockSize(int i)
Controls multiline behaviour. If set to a value greater than 0, it specifies the number of rows send in a block to the sender.- Overrides:
setBlockSize
in classIteratingPipe<String>
- Default value
- 0 (one line at a time, no prefix of suffix)
-
setStartPosition
public void setStartPosition(int i)
IfstartPosition >= 0
, this field contains the start position of the key in the current record (first character is 0); A sequence of lines with the same key is put in one block and send to the sender. Cannot be used in combination with blockSize.- Default value
- -1
-
setEndPosition
public void setEndPosition(int i)
IfendPosition >= startPosition
, this field contains the end position of the key in the current record- Default value
- -1
-
setCombineBlocks
public void setCombineBlocks(boolean combineBlocks)
Iftrue
, all items in a block are sent at once. If set false, items are sent individually, potentially leveraging block enabled sending capabilities of the sender- Default value
- true
-
setBlockPrefix
public void setBlockPrefix(String string)
IfcombineBlocks = true
, this string is inserted at the start of each block. RequiresblockSize
orstartPosition
andendPosition
to be set too.- Default value
- <block>
-
setBlockSuffix
public void setBlockSuffix(String string)
IfcombineBlocks = true
, this string is inserted at the end of the set of lines. RequiresblockSize
orstartPosition
andendPosition
to be set too.- Default value
- </block>
-
setLinePrefix
public void setLinePrefix(String string)
This string is inserted at the start of each item
-
setLineSuffix
public void setLineSuffix(String string)
This string is appended at the end of each item
-
setEscapeXml
public void setEscapeXml(boolean escapeXml)
Escape XML characters in each item- Default value
- false
-
getStringIteratorPipeBlockSize
public int getStringIteratorPipeBlockSize()
-
getStartPosition
public int getStartPosition()
-
getEndPosition
public int getEndPosition()
-
isCombineBlocks
public boolean isCombineBlocks()
-
getBlockPrefix
public String getBlockPrefix()
-
getBlockSuffix
public String getBlockSuffix()
-
getLinePrefix
public String getLinePrefix()
-
getLineSuffix
public String getLineSuffix()
-
isEscapeXml
public boolean isEscapeXml()
-
-