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.
For file 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
parameterNamesMustBeUnique
Fields inherited from class org.frankframework.core.TransactionAttributes
log
Fields 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 TypeMethodDescriptionvoid
addChild
(IRecordHandler handler) Deprecated.please use addRecordHandler()void
addChild
(IRecordHandlerManager manager) Deprecated.please use addManagervoid
addChild
(IResultHandler handler) Deprecated.Please use addResultHandler()void
addChild
(RecordHandlingFlow flowEl) Deprecated.please use manager.addFlow()void
addManager
(IRecordHandlerManager manager) Deprecated.Manager determines which handlers are to be used for the current line.void
addRecordHandler
(IRecordHandler handler) Deprecated.Handler for transforming records of a specific typevoid
addResultHandler
(IResultHandler handler) Deprecated.Handler for processing transformed recordsprotected void
closeAllBlocks
(PipeLineSession session, String streamId, IResultHandler handler, Map<String, Object> blocks) Deprecated.void
Deprecated.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 InputStream
getInputStream
(String streamId, Message input, PipeLineSession session) Deprecated.getManager
(String name) Deprecated.protected BufferedReader
getReader
(String streamId, Message input, PipeLineSession session) Deprecated.getRecordHandler
(String name) Deprecated.getResultHandler
(String name) Deprecated.protected String
getStreamId
(Message input, PipeLineSession session) Deprecated.void
setCharset
(String string) Deprecated.Characterset used for reading file or inputstream"void
setCloseInputstreamOnExit
(boolean b) Deprecated.If set tofalse
, the inputstream is not closed after it has been used.void
setReaderFactory
(IReaderFactory factory) Deprecated.Factory for thereader
.void
setStoreOriginalBlock
(boolean b) Deprecated.If settrue
the original block is stored under the session keyoriginalBlock
.void
start()
Deprecated.Perform necessary action to start the pipe.void
stop()
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, skipPipe
Methods 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, throwEvent
Methods inherited from class org.frankframework.core.TransactionAttributes
configureTransactionAttributes, isTransacted, isTransacted, setTransacted, setTransactionTimeout
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.HasTransactionAttribute
getTransactionAttribute, getTransactionTimeout, getTxDef, setTransactionAttribute
Methods inherited from interface org.frankframework.core.IForwardTarget
getName
Methods 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
-
Constructor Details
-
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:FixedForwardPipe
Checks for correct configuration of forward.- Specified by:
configure
in interfaceIConfigurable
- Overrides:
configure
in classFixedForwardPipe
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
start
public void start()Deprecated.Description copied from interface:IPipe
Perform 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:
start
in interfaceIPipe
- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
- Overrides:
start
in classAbstractPipe
-
stop
public void stop()Deprecated.Description copied from interface:IPipe
Perform necessary actions to stop thePipe
.
For instance, closing JMS connections, DBMS connections etc.- Specified by:
stop
in interfaceIPipe
- Specified by:
stop
in interfaceorg.springframework.context.Lifecycle
- Overrides:
stop
in 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 settrue
the 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 implementationInputStreamReaderFactory
converts using the specified character set.
-