Interface BatchExtensionProcessor
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
DefaultAdvancedTagPreloader,DefaultPriceDataPreloadProcessor
public interface BatchExtensionProcessor
extends org.springframework.core.Ordered
Component to allow an implementor to register this as a Spring Bean. It will then be injected
into all
services and used for pre/post-processing of the
batch.- Author:
- Kelly Tisdell (ktisdell)
-
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptionbooleanMethod to determine if this handler should execute.default intgetOrder()default voidpostProcess(BatchContext<?> batchContext) This method will be executed to allow further processing prior to a response being composed and returned.default voidpreProcess(BatchContext<?> batchContext) This method will be executed to allow customers to fetch, for example, data that is required for future processing.
-
Method Details
-
canHandle
Method to determine if this handler should execute.- Parameters:
test-- Returns:
-
preProcess
This method will be executed to allow customers to fetch, for example, data that is required for future processing. This is good in situations where you want to pre-fetch or batch fetch and pre-cache data for use within this batch context. Generally, implementors should save any results that they want to save and use later inBatchContext#getAdditionalProperties(). This method is called only ifcanHandle(Class)returns true. It is executed inAbstractDataExchangeService.saveAll(List, ContextInfo)afterAbstractDataExchangeService.split(List, BatchContext)and beforeAbstractDataExchangeService.aggregate(BatchContext).- Parameters:
batchContext-
-
postProcess
This method will be executed to allow further processing prior to a response being composed and returned. This will be called immediately prior toAbstractDataExchangeService.aggregate(BatchContext). Generally, implementors should make use of any results that they need inBatchContext.- Parameters:
batchContext-
-
getOrder
default int getOrder()- Specified by:
getOrderin interfaceorg.springframework.core.Ordered
-