Pipeline

open class Pipeline<TSubject : Any, TContext : Any>(phases: PipelinePhase)

Represents an execution pipeline for asynchronous extensible computations

Constructors

Link copied to clipboard
Link copied to clipboard
fun Pipeline(vararg phases: PipelinePhase)

Functions

Link copied to clipboard

Adds phase to the end of this pipeline

Link copied to clipboard
open fun afterIntercepted()

Invoked after an interceptor has been installed

Link copied to clipboard
suspend fun execute(context: TContext, subject: TSubject): TSubject

Executes this pipeline in the given context and with the given subject

Link copied to clipboard

Inserts phase after the reference phase. If there are other phases inserted after reference, then phase will be inserted after them. Example:

Link copied to clipboard

Inserts phase before the reference phase. Example:

Link copied to clipboard

Adds block to the phase of this pipeline

Link copied to clipboard

Merges another pipeline into this pipeline, maintaining relative phases order

Link copied to clipboard
Link copied to clipboard

Reset current pipeline from other.

Properties

Link copied to clipboard

Provides common place to store pipeline attributes

Link copied to clipboard
open val developmentMode: Boolean = false

Indicated if debug mode is enabled. In debug mode users will get more details in the stacktrace.

Link copied to clipboard
Link copied to clipboard

Phases of this pipeline

Extensions

Link copied to clipboard
inline suspend fun <TContext : Any> Pipeline<Unit, TContext>.execute(context: TContext)

Executes this pipeline

Link copied to clipboard
inline fun <TSubject : Any, TContext : Any> Pipeline<*, TContext>.intercept(phase: PipelinePhase, noinline block: suspend PipelineContext<TSubject, TContext>.(TSubject) -> Unit)

Intercepts an untyped pipeline when the subject is of the given type