Class 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 Details

  • Constructor Details

    • StreamTransformerPipe

      public StreamTransformerPipe()
      Deprecated.
  • Method Details

    • getStreamId

      protected String getStreamId(Message input, PipeLineSession session)
      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

      public void configure() throws ConfigurationException
      Deprecated.
      Description copied from class: FixedForwardPipe
      Checks for correct configuration of forward.
      Specified by:
      configure in interface IConfigurable
      Overrides:
      configure in class FixedForwardPipe
      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 the IConfigurable.configure() method, for each start and stop command of the adapter.
      Specified by:
      start in interface IPipe
      Specified by:
      start in interface org.springframework.context.Lifecycle
      Overrides:
      start in class AbstractPipe
    • stop

      public void stop()
      Deprecated.
      Description copied from interface: IPipe
      Perform necessary actions to stop the Pipe.
      For instance, closing JMS connections, DBMS connections etc.
      Specified by:
      stop in interface IPipe
      Specified by:
      stop in interface org.springframework.context.Lifecycle
      Overrides:
      stop in class AbstractPipe
    • addChild

      @Deprecated public void addChild(IRecordHandlerManager manager) throws Exception
      Deprecated.
      please use addManager
      Register a uniquely named manager.
      Throws:
      Exception
    • addManager

      public void addManager(IRecordHandlerManager manager) throws Exception
      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

      public IRecordHandlerManager getManager(String name)
      Deprecated.
    • addChild

      @Deprecated public void addChild(RecordHandlingFlow flowEl) throws ConfigurationException
      Deprecated.
      please use manager.addFlow()
      Register a flow element that contains the handlers for a specific record type (key)
      Throws:
      ConfigurationException
    • addChild

      @Deprecated public void addChild(IRecordHandler handler)
      Deprecated.
      please use addRecordHandler()
      Register a uniquely named record manager.
    • addRecordHandler

      public void addRecordHandler(IRecordHandler handler)
      Deprecated.
      Handler for transforming records of a specific type
    • getRecordHandler

      public IRecordHandler getRecordHandler(String name)
      Deprecated.
    • addChild

      @Deprecated public void addChild(IResultHandler handler)
      Deprecated.
      Please use addResultHandler()
      Register a uniquely named result manager.
    • addResultHandler

      public void addResultHandler(IResultHandler handler)
      Deprecated.
      Handler for processing transformed records
    • getResultHandler

      public IResultHandler getResultHandler(String name)
      Deprecated.
    • doPipe

      public PipeRunResult doPipe(Message input, PipeLineSession session) throws PipeRunException
      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 Exception
      Deprecated.
      Throws:
      Exception
    • setStoreOriginalBlock

      public void setStoreOriginalBlock(boolean b)
      Deprecated.
      If set true the original block is stored under the session key originalBlock.
      Default value
      false
    • setCloseInputstreamOnExit

      public void setCloseInputstreamOnExit(boolean b)
      Deprecated.
      If set to false, the inputstream is not closed after it has been used.
      Default value
      true
    • setCharset

      public void setCharset(String string)
      Deprecated.
      Characterset used for reading file or inputstream"
      Default value
      UTF-8
    • setReaderFactory

      public void setReaderFactory(IReaderFactory factory)
      Deprecated.
      Factory for the reader. The default implementation InputStreamReaderFactory converts using the specified character set.