Interface ImportBatchHandler
- All Known Implementing Classes:
 AbstractImportBatchHandler
public interface ImportBatchHandler
The main extension point for responding to a batch coming in from import services. These handlers
 are ordered and injected into the 
BatchListener which is the one that receives an event.
 In the case of multiple registered handlers, the first one that says it can handle the batch will
 be the one that handles it- Author:
 - Phillip Verheyden (phillipuniverse)
 
- 
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(BatchRequest batch) Whether or not this handler can actually deal with the given batch.default voidThe data route key that is relevant to the import processhandle(BatchRequest batch) Handle the batch and emit completions for all items within the batch.default voidHandles initializing some context state before handling this batch. 
- 
Method Details
- 
canHandle
Whether or not this handler can actually deal with the given batch. Checks will generally be based onBatchRequest.getType().- Parameters:
 batch-- Returns:
 - whether or not this handler can actually handle the given batch
 
 - 
initializeContextForBatch
Handles initializing some context state before handling this batch. This could include setting up theCurrencyContext, a baseContextInfoto be used for various persistent and de/serialization operations later on, or other relevant state.NOTE: This is called by
BatchListenerbeforehandle(BatchRequest)is called.- Parameters:
 batch- The batch to be processed.
 - 
finalizeContextForBatch
 - 
handle
Handle the batch and emit completions for all items within the batch.- Parameters:
 batch- a batch of records that this handler should deal with- Returns:
 - the result of handling a batch
 
 - 
getDataRouteKey
String getDataRouteKey()The data route key that is relevant to the import process- Returns:
 - The data route key that is relevant to the import process
 
 
 -