Package org.frankframework.batch
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 Summary
Modifier and TypeMethodDescriptionvoidclose()voidcloseBlock(PipeLineSession session, String streamId, String blockName, Map<String, Object> blocks) voidcloseDocument(PipeLineSession session, String streamId) voidcloseRecordType(PipeLineSession session, String streamId) finalizeResult(PipeLineSession session, String streamId, boolean error) Called when all records in the original file are handled.voidhandleResult(PipeLineSession session, String streamId, String recordKey, String result) write a result record.booleanbooleanbooleanvoidopen()voidvoidopenDocument(PipeLineSession session, String streamId) Called once, before the first record of a stream is presented to handleResult.voidopenRecordType(PipeLineSession session, String streamId) voidsetDefault(boolean isDefault) voidsetPipe(AbstractPipe pipe) Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.core.IConfigurable
configure
-
Method Details
-
setPipe
-
open
- Throws:
SenderException
-
close
- Throws:
SenderException
-
openDocument
Called once, before the first record of a stream is presented to handleResult.- Parameters:
session- current PipeLineSessionstreamId- identification of the original file/stream/message- Throws:
Exception
-
closeDocument
-
handleResult
void handleResult(PipeLineSession session, String streamId, String recordKey, String result) throws Exception write a result record.- Parameters:
session- current PipeLineSessionstreamId- identification of the original file/stream/message containing the untransformed recordsrecordKey- key of the record (describes the record type)result- transformed record- Throws:
Exception
-
finalizeResult
Called when all records in the original file are handled.- Parameters:
session- current PipeLineSessionstreamId- identification of the original file/stream/message containing the untransformed records- Returns:
- the name or names of the output files
- Throws:
Exception
-
openRecordType
- Parameters:
session- current PipeLineSessionstreamId- identification of the original file/stream/message containing the untransformed records- Throws:
Exception
-
closeRecordType
- Parameters:
session- current PipeLineSessionstreamId- identification of the original file/stream/message containing the untransformed records- Throws:
Exception
-
openBlock
void openBlock(PipeLineSession session, String streamId, String blockName, Map<String, Object> blocks) throws Exception- Throws:
Exception
-
closeBlock
void closeBlock(PipeLineSession session, String streamId, String blockName, Map<String, Object> blocks) throws Exception- Throws:
Exception
-
isDefault
boolean isDefault()- Returns:
- true if this resulthandler should be used for all flows if no resulthandler is specified for that flow
-
setDefault
void setDefault(boolean isDefault) -
hasPrefix
boolean hasPrefix() -
isBlockByRecordType
boolean isBlockByRecordType()- Returns:
- true causes groups of identical records, indicated by
newRecordTypeto appear in a block.
-