open class Pipeline<TSubject : Any, TContext : Any>
Represents an execution pipeline for asynchronous extensible computations
Pipeline(phase: PipelinePhase, interceptors: List<PipelineInterceptor<TSubject, TContext>>)Pipeline(vararg phases: PipelinePhase)
Represents an execution pipeline for asynchronous extensible computations |
val attributes: Attributes
Provides common place to store pipeline attributes |
|
val isEmpty: Boolean |
|
val items: List<PipelinePhase>
Phases of this pipeline |
fun addPhase(phase: PipelinePhase): Unit
Adds phase to the end of this pipeline |
|
open fun afterIntercepted(): Unit
Invoked after an interceptor has been installed |
|
suspend fun execute(context: TContext, subject: TSubject): TSubject
Executes this pipeline in the given context and with the given subject |
|
fun insertPhaseAfter(reference: PipelinePhase, phase: PipelinePhase): Unit
|
|
fun insertPhaseBefore(reference: PipelinePhase, phase: PipelinePhase): Unit
|
|
fun intercept(phase: PipelinePhase, block: PipelineInterceptor<TSubject, TContext>): Unit
|
|
fun merge(from: Pipeline<TSubject, TContext>): Unit
Merges another pipeline into this pipeline, maintaining relative phases order |
suspend fun <TContext : Any> Pipeline<Unit, TContext>.execute(context: TContext): Unit
Executes this pipeline |
|
fun <TSubject : Any, TContext : Any> Pipeline<*, TContext>.intercept(phase: PipelinePhase, block: suspend PipelineContext<TSubject, TContext>.(TSubject) -> Unit): Unit
Intercepts an untyped pipeline when the subject is of the given type |