|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.hammurapi.flow.runtime.impl.Joiner<T,C,R>
T - Join element type.C - Context type passed from addInput to join.R - Return type passed from join to to addInput.public abstract class Joiner<T,C,R>
Helper class to join data from several inputs.
| Nested Class Summary | |
|---|---|
static class |
Joiner.InputConsumer
Interface to consume inputs in join() method. |
| Constructor Summary | |
|---|---|
protected |
Joiner(Collection<T>[] inputCollectors,
Class<T> inputType,
boolean outerJoin)
Creates joiner. |
| Method Summary | |
|---|---|
R |
addInput(int index,
T input,
C context)
Adds input. |
protected abstract boolean |
isValidInput(int index,
T input)
This method is invoked for all inputs before joining. |
protected abstract R |
join(T[] inputs,
C context,
Joiner.InputConsumer consumer,
int activator)
This method is invoked for every combination of valid inputs. |
protected abstract boolean |
partialJoin(T[] inputs,
int index)
This method is invoked to validate already joined inputs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Joiner(Collection<T>[] inputCollectors,
Class<T> inputType,
boolean outerJoin)
inputCollectors - Input collectors.inputType - Input type is required because of erasure of generics and T is needed at runtime.outerJoin - If true, each input addition triggers invocation of join, even if other input collectors
don't have any data.| Method Detail |
|---|
public R addInput(int index,
T input,
C context)
throws Exception
index - Input index.input - Input.
Exception
protected abstract R join(T[] inputs,
C context,
Joiner.InputConsumer consumer,
int activator)
throws Exception
inputs - Inputs
Exception
protected abstract boolean isValidInput(int index,
T input)
index - input -
protected abstract boolean partialJoin(T[] inputs,
int index)
throws Exception
inputs - Inputs array.index - Index of last already joined input.
Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||