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 TypeMethodDescriptionvoid
close()
void
closeBlock
(PipeLineSession session, String streamId, String blockName, Map<String, Object> blocks) void
closeDocument
(PipeLineSession session, String streamId) void
closeRecordType
(PipeLineSession session, String streamId) finalizeResult
(PipeLineSession session, String streamId, boolean error) Called when all records in the original file are handled.void
handleResult
(PipeLineSession session, String streamId, String recordKey, String result) write a result record.boolean
boolean
boolean
void
open()
void
void
openDocument
(PipeLineSession session, String streamId) Called once, before the first record of a stream is presented to handleResult.void
openRecordType
(PipeLineSession session, String streamId) void
setDefault
(boolean isDefault) void
setPipe
(AbstractPipe pipe) Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods 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
newRecordType
to appear in a block.
-