PeekPipelineStage

A specialized pipeline stage that "peeks" at the input without modifying it.

This interface is useful for stages that need to perform some operation on the input (such as validation, logging, or side effects) but don't need to transform it into a different object.

The process method is implemented to call peek and then return the input unchanged.

Type Parameters

T

the type of both the input and output

Inheritors

Properties

Link copied to clipboard
abstract val hook: (PipelineHooks) -> Pipeline.(T) -> Unit?

A hook function that is invoked after the stage completes processing.

Functions

Link copied to clipboard
open fun execute(input: T, data: SharedPipelineData): T

Executes this pipeline stage with the given input and shared data.

Link copied to clipboard

Utility function to execute a pipeline stage that takes Unit as input.

Link copied to clipboard
open fun invokeHook(data: SharedPipelineData, input: T, output: T)

Invokes the hook function for this stage, if one is defined.

Link copied to clipboard
abstract fun peek(input: T, data: SharedPipelineData)

Peeks at the input without modifying it.

Link copied to clipboard
open override fun process(input: T, data: SharedPipelineData): T

Processes the input by calling peek and then returning the input unchanged.

Link copied to clipboard
infix fun <A, B, C> PipelineStage<A, B>.then(next: PipelineStage<B, C>): PipelineStage<A, C>

Chains two pipeline stages together to form a new pipeline stage.

Link copied to clipboard

Conditionally chains this pipeline stage with next if it is not null.