open class Pipeline<TSubject : Any, TContext : Any>
Represents an execution pipeline for asynchronous extensible computations |
|
interface PipelineContext<TSubject : Any, TContext : Any> : CoroutineScope
Represents running execution of a pipeline |
|
interface PipelineExecutor<R>
Represent an object that launches pipeline execution |
|
class PipelinePhase
Represents a phase in a pipeline |
annotation class ContextDsl
DslMarker for pipeline execution context |
class InvalidPhaseException : Throwable
An exception about misconfigured phases in a pipeline |
typealias PipelineInterceptor<TSubject, TContext> = suspend PipelineContext<TSubject, TContext>.(TSubject) -> Unit
Represents an interceptor type which is a suspend extension function for context |
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 |
|
fun <TSubject : Any, TContext : Any> pipelineExecutorFor(context: TContext, interceptors: List<PipelineInterceptor<TSubject, TContext>>, subject: TSubject): PipelineExecutor<TSubject>
Build a pipeline of the specified interceptors and create executor |