OUT - the output data type.public class OutputConsumerBuilder<OUT> extends Object implements OutputConsumer<OUT>
| Modifier and Type | Method and Description |
|---|---|
void |
onComplete()
Called when the channel closes after the invocation completes its execution.
|
void |
onError(RoutineException error)
Called when the bounded channel transfer is aborted.
|
void |
onOutput(OUT output)
Called when an output is passed to the channel.
|
OutputConsumerBuilder<OUT> |
thenOnComplete(Consumer<Void> consumer)
Returns a new output consumer builder employing also the specified consumer function to
handle the invocation completion.
|
OutputConsumerBuilder<OUT> |
thenOnError(Consumer<? super RoutineException> consumer)
Returns a new output consumer builder employing also the specified consumer function to
handle the invocation errors.
|
OutputConsumerBuilder<OUT> |
thenOnOutput(Consumer<? super OUT> consumer)
Returns a new output consumer builder employing also the specified consumer function to
handle the invocation outputs.
|
public void onComplete()
OutputConsumeronComplete in interface OutputConsumer<OUT>public void onError(@Nullable
RoutineException error)
OutputConsumeronError in interface OutputConsumer<OUT>error - the reason of the abortion.public void onOutput(OUT output)
OutputConsumeronOutput in interface OutputConsumer<OUT>output - the output.@NotNull public OutputConsumerBuilder<OUT> thenOnComplete(@NotNull Consumer<Void> consumer)
consumer - the consumer function.@NotNull public OutputConsumerBuilder<OUT> thenOnError(@NotNull Consumer<? super RoutineException> consumer)
consumer - the consumer function.@NotNull public OutputConsumerBuilder<OUT> thenOnOutput(@NotNull Consumer<? super OUT> consumer)
consumer - the consumer function.