Package io.vertx.tp.modular.reference
Class AbstractRay<T>
- java.lang.Object
-
- io.vertx.tp.modular.reference.AbstractRay<T>
-
- All Implemented Interfaces:
AoRay<T>
public abstract class AbstractRay<T> extends Object implements AoRay<T>
## Abstract Reference Processor ### 1. Intro Template pattern to provide all the calculation metadata in current class, all sub-classes could share the data structure that current class defined. ### 2. Components Here are two hash maps that stored `field = xx`, the `xx` means components of following two categories: - RaySource: The field calculator component that contains code logical ( Action ). - DataQRule: The field definition rules POJO data object that contains metadata definition ( Rule ).- Author:
- Lang
-
-
Field Summary
Fields Modifier and Type Field Description protected ConcurrentMap<String,io.vertx.tp.modular.reference.RaySource>inputThe hashmap reference of `field =RaySource`.protected ConcurrentMap<String,RResult>outputThe hashmap reference of `field =AoRule`.protected DataTpltplThe reference toDataTplthat be related to model definition.
-
Constructor Summary
Constructors Constructor Description AbstractRay()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description TdoRay(T input)This method will modify the inputRecordelement(s).io.vertx.core.Future<T>doRayAsync(T input)abstract Texec(T input)This method must be inherit by all sub-classes, it provide reference data mounting.abstract io.vertx.core.Future<T>execAsync(T input)AoRay<T>on(DataTpl tpl)Bind the component to data model templateDataTpl.protected io.vertx.core.Future<ConcurrentMap<String,io.vertx.core.json.JsonArray>>thenCombine(List<io.vertx.core.Future<ConcurrentMap<String,io.vertx.core.json.JsonArray>>> futures)
-
-
-
Field Detail
-
input
protected transient ConcurrentMap<String,io.vertx.tp.modular.reference.RaySource> input
The hashmap reference of `field =RaySource`.
-
output
protected transient ConcurrentMap<String,RResult> output
The hashmap reference of `field =AoRule`.
-
-
Method Detail
-
doRay
public T doRay(T input)
This method will modify the inputRecordelement(s). Here contains `shorten` code logical when the hash map is EMPTY, skip reference calculator.
-
doRayAsync
public io.vertx.core.Future<T> doRayAsync(T input)
- Specified by:
doRayAsyncin interfaceAoRay<T>
-
exec
public abstract T exec(T input)
This method must be inherit by all sub-classes, it provide reference data mounting.- Parameters:
input- Input element ofRecordfor single/multi- Returns:
- Return the modified data record(s).
-
thenCombine
protected io.vertx.core.Future<ConcurrentMap<String,io.vertx.core.json.JsonArray>> thenCombine(List<io.vertx.core.Future<ConcurrentMap<String,io.vertx.core.json.JsonArray>>> futures)
-
-