Interface IResultHandler

All Superinterfaces:
org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.Aware, FrankElement, HasApplicationContext, HasName, IConfigurable, IScopeProvider, NameAware
All Known Implementing Classes:
AbstractResultHandler, Result2BlobWriter, Result2ClobWriter, Result2Filewriter, Result2LobWriterBase, Result2StringWriter, ResultBlock2Sender, ResultWriter

@FrankDocGroup(BATCH) public interface IResultHandler extends IConfigurable, FrankElement, NameAware
Interface for handling a transformed record.
Author:
John Dekker
  • Method Details Link icon

    • setPipe Link icon

      void setPipe(AbstractPipe pipe)
    • open Link icon

      void open() throws SenderException
      Throws:
      SenderException
    • close Link icon

      void close() throws SenderException
      Throws:
      SenderException
    • openDocument Link icon

      void openDocument(PipeLineSession session, String streamId) throws Exception
      Called once, before the first record of a stream is presented to handleResult.
      Parameters:
      session - current PipeLineSession
      streamId - identification of the original file/stream/message
      Throws:
      Exception
    • closeDocument Link icon

      void closeDocument(PipeLineSession session, String streamId)
    • handleResult Link icon

      void handleResult(PipeLineSession session, String streamId, String recordKey, String result) throws Exception
      write a result record.
      Parameters:
      session - current PipeLineSession
      streamId - identification of the original file/stream/message containing the untransformed records
      recordKey - key of the record (describes the record type)
      result - transformed record
      Throws:
      Exception
    • finalizeResult Link icon

      String finalizeResult(PipeLineSession session, String streamId, boolean error) throws Exception
      Called when all records in the original file are handled.
      Parameters:
      session - current PipeLineSession
      streamId - identification of the original file/stream/message containing the untransformed records
      Returns:
      the name or names of the output files
      Throws:
      Exception
    • openRecordType Link icon

      void openRecordType(PipeLineSession session, String streamId) throws Exception
      Parameters:
      session - current PipeLineSession
      streamId - identification of the original file/stream/message containing the untransformed records
      Throws:
      Exception
    • closeRecordType Link icon

      void closeRecordType(PipeLineSession session, String streamId) throws Exception
      Parameters:
      session - current PipeLineSession
      streamId - identification of the original file/stream/message containing the untransformed records
      Throws:
      Exception
    • openBlock Link icon

      void openBlock(PipeLineSession session, String streamId, String blockName, Map<String,Object> blocks) throws Exception
      Throws:
      Exception
    • closeBlock Link icon

      void closeBlock(PipeLineSession session, String streamId, String blockName, Map<String,Object> blocks) throws Exception
      Throws:
      Exception
    • isDefault Link icon

      boolean isDefault()
      Returns:
      true if this resulthandler should be used for all flows if no resulthandler is specified for that flow
    • setDefault Link icon

      void setDefault(boolean isDefault)
    • hasPrefix Link icon

      boolean hasPrefix()
    • isBlockByRecordType Link icon

      boolean isBlockByRecordType()
      Returns:
      true causes groups of identical records, indicated by newRecordType to appear in a block.