Interface CoBundleTrigger<IN1,IN2>
- Type Parameters:
IN1- The first input element type.IN2- The second input element type.
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CountCoBundleTrigger
A
CoBundleTrigger is similar with BundleTrigger, and the only differences is
CoBundleTrigger can handle two inputs.-
Method Summary
Modifier and TypeMethodDescriptionexplain()voidonElement1(IN1 element) Called for every element that gets added to the bundle from the first input.voidonElement2(IN2 element) Called for every element that gets added to the bundle from the second input.voidregisterCallback(BundleTriggerCallback callback) Register a callback which will be called once this trigger decides to finish this bundle.voidreset()Reset the trigger to its initiate status.
-
Method Details
-
registerCallback
Register a callback which will be called once this trigger decides to finish this bundle. -
onElement1
Called for every element that gets added to the bundle from the first input. If the trigger decides to start evaluate,BundleTriggerCallback.finishBundle()should be invoked.- Parameters:
element- The element that arrived from the first input.- Throws:
Exception
-
onElement2
Called for every element that gets added to the bundle from the second input. If the trigger decides to start evaluate,BundleTriggerCallback.finishBundle()should be invoked.- Parameters:
element- The element that arrived from the second input.- Throws:
Exception
-
reset
void reset()Reset the trigger to its initiate status. -
explain
String explain()
-