OUT - the output data type.public abstract class CommandInvocation<OUT> extends InvocationFactory<Void,OUT> implements Invocation<Void,OUT>
| Constructor and Description |
|---|
CommandInvocation() |
| Modifier and Type | Method and Description |
|---|---|
Invocation<Void,OUT> |
newInvocation()
Creates and return a new invocation instance.
A proper implementation will return a new invocation instance each time it is called, unless the returned object is immutable and does not cause any side effect. Any behavior other than that may lead to unexpected results. |
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(Void input,
ResultChannel<OUT> result)
Called when an input is passed to the routine.
This method is called once for each input object. |
void |
onTerminate()
Called when the invocation execution has completed.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonResult@NotNull public final Invocation<Void,OUT> newInvocation()
InvocationFactorynewInvocation in class InvocationFactory<Void,OUT>public final void onAbort(@Nullable
RoutineException reason)
InvocationonAbort in interface Invocation<Void,OUT>reason - the reason of the abortion.public final void onDestroy()
InvocationonDestroy in interface Invocation<Void,OUT>public final void onInitialize()
InvocationonInitialize in interface Invocation<Void,OUT>public final void onInput(Void input, @NotNull ResultChannel<OUT> result)
InvocationonInput in interface Invocation<Void,OUT>input - the input.result - the result channel.public final void onTerminate()
InvocationonTerminate in interface Invocation<Void,OUT>