public interface Processor<T,R>
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup(String tenantId,
List<T> items)
This method is called once all of the items in the list of been
processed to generate new information.
|
void |
initialise(String tenantId,
List<T> items)
This method enables the processor to perform some initialisation
tasks before processing the items individually to generate new
information.
|
boolean |
isMultiple()
This method determines whether the processor results in multiple results
per item.
|
List<R> |
processMultiple(String tenantId,
T item)
This method processes the supplied item to
generate zero or more resulting values.
|
R |
processSingle(String tenantId,
T item)
This method processes the supplied item to optionally
generated a new resulting value.
|
void initialise(String tenantId, List<T> items)
tenantId - The optional tenant iditems - boolean isMultiple()
R processSingle(String tenantId, T item) throws Exception
tenantId - The optional tenant iditem - The itemException - Failed to process the itemList<R> processMultiple(String tenantId, T item) throws Exception
tenantId - The optional tenant iditem - The itemException - Failed to process the itemvoid cleanup(String tenantId, List<T> items)
tenantId - The optional tenant iditems - Copyright © 2015–2016 Red Hat, Inc.. All rights reserved.