Package org.frankframework.batch
Class StreamTransformerPipe
java.lang.Object
org.frankframework.core.TransactionAttributes
org.frankframework.pipes.AbstractPipe
org.frankframework.pipes.FixedForwardPipe
org.frankframework.batch.StreamTransformerPipe
- All Implemented Interfaces:
FrankElement,HasApplicationContext,HasName,HasTransactionAttribute,IConfigurable,IForwardTarget,IPipe,IScopeProvider,IWithParameters,NameAware,EventThrowing,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle
- Direct Known Subclasses:
BatchFileTransformerPipe,BatchTransformerPipeBase
@EnterpriseIntegrationPattern(TRANSLATOR)
public class StreamTransformerPipe
extends FixedForwardPipe
Deprecated.
Warning: non-maintained functionality.
Pipe for transforming a stream with records. Records in the stream must be separated with new line characters, or be of fixed length.
For files containing only a single type of lines, a simpler configuration without managers and flows
can be specified. A single recordHandler with key="*" and (optional) a single resultHandler need to be specified.
Each line will be handled by this recordHandler and resultHandler.
- Since:
- 4.7
- Author:
- John Dekker / Gerrit van Brakel
-
Field Summary
FieldsFields inherited from class org.frankframework.pipes.AbstractPipe
parameterNamesMustBeUniqueFields inherited from class org.frankframework.core.TransactionAttributes
logFields inherited from interface org.frankframework.core.IPipe
LONG_DURATION_MONITORING_EVENT, MESSAGE_SIZE_MONITORING_EVENT, PIPE_EXCEPTION_MONITORING_EVENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(IRecordHandler handler) Deprecated.please use addRecordHandler()voidaddChild(IRecordHandlerManager manager) Deprecated.please use addManagervoidaddChild(IResultHandler handler) Deprecated.Please use addResultHandler()voidaddChild(RecordHandlingFlow flowEl) Deprecated.please use manager.addFlow()voidaddManager(IRecordHandlerManager manager) Deprecated.Manager determines which handlers are to be used for the current line.voidaddRecordHandler(IRecordHandler handler) Deprecated.Handler for transforming records of a specific typevoidaddResultHandler(IResultHandler handler) Deprecated.Handler for processing transformed recordsprotected voidcloseAllBlocks(PipeLineSession session, String streamId, IResultHandler handler, Map<String, Object> blocks) Deprecated.voidDeprecated.Checks for correct configuration of forward.doPipe(Message input, PipeLineSession session) Deprecated.Open a reader for the file named according the input messsage and transform it.protected InputStreamgetInputStream(String streamId, Message input, PipeLineSession session) Deprecated.getManager(String name) Deprecated.protected BufferedReadergetReader(String streamId, Message input, PipeLineSession session) Deprecated.getRecordHandler(String name) Deprecated.getResultHandler(String name) Deprecated.protected StringgetStreamId(Message input, PipeLineSession session) Deprecated.voidsetCharset(String string) Deprecated.Characterset used for reading file or inputstream"voidsetCloseInputstreamOnExit(boolean b) Deprecated.If set tofalse, the inputstream is not closed after it has been used.voidsetReaderFactory(IReaderFactory factory) Deprecated.Factory for thereader.voidsetStoreOriginalBlock(boolean b) Deprecated.If settruethe original block is stored under the session keyoriginalBlock.voidstart()Deprecated.Perform necessary action to start the pipe.voidstop()Deprecated.Perform necessary actions to stop thePipe.
For instance, closing JMS connections, DBMS connections etc.Methods inherited from class org.frankframework.pipes.FixedForwardPipe
getParameterValue, setIfParam, setIfValue, setOnlyIfSessionKey, setOnlyIfValue, setSkipOnEmptyInput, setUnlessSessionKey, setUnlessValue, skipPipeMethods inherited from class org.frankframework.pipes.AbstractPipe
addForward, addParameter, consumesSessionVariable, createBean, findForward, getAdapter, getEventSourceName, getForwards, getParameterList, hasRegisteredForward, isRunning, registerEvent, setApplicationContext, setChompCharSize, setDurationThreshold, setElementToMove, setElementToMoveChain, setElementToMoveSessionKey, setEmptyInputReplacement, setGetInputFromFixedValue, setGetInputFromSessionKey, setHideRegex, setLocker, setLogIntermediaryResults, setMaxThreads, setName, setPreserveInput, setRemoveCompactMsgNamespaces, setRestoreMovedElements, setSecLogSessionKeys, setSizeStatistics, setStoreResultInSessionKey, setWriteToSecLog, sizeStatisticsEnabled, throwEventMethods inherited from class org.frankframework.core.TransactionAttributes
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeoutMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.core.HasTransactionAttribute
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttributeMethods inherited from interface org.frankframework.core.IForwardTarget
getNameMethods inherited from interface org.frankframework.core.IPipe
getChompCharSize, getDurationThreshold, getElementToMove, getElementToMoveChain, getElementToMoveSessionKey, getEmptyInputReplacement, getGetInputFromFixedValue, getGetInputFromSessionKey, getHideRegex, getLocker, getLogIntermediaryResults, getMaxThreads, getSecLogSessionKeys, getStoreResultInSessionKey, isPreserveInput, isRemoveCompactMsgNamespaces, isRestoreMovedElements, isWriteToSecLog, setPipeLine, throwEvent
-
Field Details
-
originalBlockKey
Deprecated.- See Also:
-
-
Constructor Details
-
StreamTransformerPipe
public StreamTransformerPipe()Deprecated.
-
-
Method Details
-
getStreamId
Deprecated. -
getInputStream
protected InputStream getInputStream(String streamId, Message input, PipeLineSession session) throws PipeRunException Deprecated.- Throws:
PipeRunException
-
getReader
protected BufferedReader getReader(String streamId, Message input, PipeLineSession session) throws PipeRunException Deprecated.- Throws:
PipeRunException
-
configure
Deprecated.Description copied from class:FixedForwardPipeChecks for correct configuration of forward.- Specified by:
configurein interfaceIConfigurable- Overrides:
configurein classFixedForwardPipe- Throws:
ConfigurationException- in case it was not able to configure the component.
-
start
public void start()Deprecated.Description copied from interface:IPipePerform necessary action to start the pipe. This method is executed after theIConfigurable.configure()method, for each start and stop command of the adapter.- Specified by:
startin interfaceIPipe- Specified by:
startin interfaceorg.springframework.context.Lifecycle- Overrides:
startin classAbstractPipe
-
stop
public void stop()Deprecated.Description copied from interface:IPipePerform necessary actions to stop thePipe.
For instance, closing JMS connections, DBMS connections etc.- Specified by:
stopin interfaceIPipe- Specified by:
stopin interfaceorg.springframework.context.Lifecycle- Overrides:
stopin classAbstractPipe
-
addChild
Deprecated.please use addManagerRegister a uniquely named manager.- Throws:
Exception
-
addManager
Deprecated.Manager determines which handlers are to be used for the current line. If no manager is specified, a default manager and flow are created. The default manager always uses the default flow. The default flow always uses the first registered recordHandler (if available) and the first registered resultHandler (if available).- Throws:
Exception
-
getManager
Deprecated. -
addChild
Deprecated.please use manager.addFlow()Register a flow element that contains the handlers for a specific record type (key)- Throws:
ConfigurationException
-
addChild
Deprecated.please use addRecordHandler()Register a uniquely named record manager. -
addRecordHandler
Deprecated.Handler for transforming records of a specific type -
getRecordHandler
Deprecated. -
addChild
Deprecated.Please use addResultHandler()Register a uniquely named result manager. -
addResultHandler
Deprecated.Handler for processing transformed records -
getResultHandler
Deprecated. -
doPipe
Deprecated.Open a reader for the file named according the input messsage and transform it. Move the input file to a done directory when transformation is finished and return the names of the generated files.- Throws:
PipeRunException- See Also:
-
closeAllBlocks
protected void closeAllBlocks(PipeLineSession session, String streamId, IResultHandler handler, Map<String, Object> blocks) throws ExceptionDeprecated.- Throws:
Exception
-
setStoreOriginalBlock
public void setStoreOriginalBlock(boolean b) Deprecated.If settruethe original block is stored under the session keyoriginalBlock.- Default value
- false
-
setCloseInputstreamOnExit
public void setCloseInputstreamOnExit(boolean b) Deprecated.If set tofalse, the inputstream is not closed after it has been used.- Default value
- true
-
setCharset
Deprecated.Characterset used for reading file or inputstream"- Default value
- UTF-8
-
setReaderFactory
Deprecated.Factory for thereader. The default implementationInputStreamReaderFactoryconverts using the specified character set.
-