IN - the input data type.OUT - the output data type.public class DelegatingInvocation<IN,OUT> extends Object implements Invocation<IN,OUT>
| Modifier and Type | Class and Description |
|---|---|
static class |
DelegatingInvocation.DelegationType
Delegation type enumeration.
|
| Modifier and Type | Method and Description |
|---|---|
static <IN,OUT> InvocationFactory<IN,OUT> |
factoryFrom(Routine<IN,OUT> routine,
DelegatingInvocation.DelegationType delegation)
Returns a factory of delegating invocations.
|
void |
onAbort(RoutineException reason)
Called when the routine execution is aborted.
This method may be called at any time after the invocation initialization. |
void |
onDestroy()
Called when the routine invocation is no longer needed.
|
void |
onInitialize()
Called when the routine invocation is initialized.
This is always the first method in the invocation lifecycle. |
void |
onInput(IN input,
ResultChannel<OUT> result)
Called when an input is passed to the routine.
This method is called once for each input object. |
void |
onResult(ResultChannel<OUT> result)
Called when all the inputs has been passed to the routine.
This method is called once in the invocation lifecycle to indicate that the final invocation results should be passed to the result channel. |
void |
onTerminate()
Called when the invocation execution has completed.
|
@NotNull public static <IN,OUT> InvocationFactory<IN,OUT> factoryFrom(@NotNull Routine<IN,OUT> routine, @NotNull DelegatingInvocation.DelegationType delegation)
IN - the input data type.OUT - the output data type.routine - the routine used to execute this invocation.delegation - the type of routine invocation.public void onAbort(@Nullable
RoutineException reason)
InvocationonAbort in interface Invocation<IN,OUT>reason - the reason of the abortion.public void onDestroy()
InvocationonDestroy in interface Invocation<IN,OUT>public void onInitialize()
InvocationonInitialize in interface Invocation<IN,OUT>public void onInput(IN input, @NotNull ResultChannel<OUT> result)
InvocationonInput in interface Invocation<IN,OUT>input - the input.result - the result channel.public void onResult(@NotNull
ResultChannel<OUT> result)
InvocationonResult in interface Invocation<IN,OUT>result - the result channel.public void onTerminate()
InvocationonTerminate in interface Invocation<IN,OUT>