public class Pipeline<TSubject,TContext>
Represents an execution pipeline for asynchronous extensible computations
| Constructor and Description |
|---|
Pipeline(io.ktor.util.pipeline.PipelinePhase phases)
Represents an execution pipeline for asynchronous extensible computations
|
Pipeline(PipelinePhase phase,
java.util.List<? extends kotlin.jvm.functions.Function3<? super io.ktor.util.pipeline.PipelineContext<TSubject,TContext>,? super TSubject,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object>> interceptors) |
| Modifier and Type | Method and Description |
|---|---|
void |
addPhase(PipelinePhase phase)
Adds phase to the end of this pipeline
|
void |
afterIntercepted()
Invoked after an interceptor has been installed
|
java.lang.Object |
execute(TContext context,
TSubject subject,
kotlin.coroutines.experimental.Continuation<? super TSubject> p)
Executes this pipeline in the given context and with the given subject
|
Attributes |
getAttributes()
Provides common place to store pipeline attributes
|
java.util.List<io.ktor.util.pipeline.PipelinePhase> |
getItems()
Phases of this pipeline
|
void |
insertPhaseAfter(PipelinePhase reference,
PipelinePhase phase)
Inserts phase after the reference phase
|
void |
insertPhaseBefore(PipelinePhase reference,
PipelinePhase phase)
Inserts phase before the reference phase
|
void |
intercept(PipelinePhase phase,
kotlin.jvm.functions.Function3<? super io.ktor.util.pipeline.PipelineContext<TSubject,TContext>,? super TSubject,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object> block)
Adds block to the phase of this pipeline
|
boolean |
isEmpty() |
void |
merge(Pipeline<TSubject,TContext> from)
Merges another pipeline into this pipeline, maintaining relative phases order
|
public Pipeline(io.ktor.util.pipeline.PipelinePhase phases)
Represents an execution pipeline for asynchronous extensible computations
public Pipeline(PipelinePhase phase, java.util.List<? extends kotlin.jvm.functions.Function3<? super io.ktor.util.pipeline.PipelineContext<TSubject,TContext>,? super TSubject,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object>> interceptors)
public Attributes getAttributes()
Provides common place to store pipeline attributes
public java.lang.Object execute(TContext context,
TSubject subject,
kotlin.coroutines.experimental.Continuation<? super TSubject> p)
Executes this pipeline in the given context and with the given subject
public java.util.List<io.ktor.util.pipeline.PipelinePhase> getItems()
Phases of this pipeline
public void addPhase(PipelinePhase phase)
Adds phase to the end of this pipeline
public void insertPhaseAfter(PipelinePhase reference, PipelinePhase phase)
Inserts phase after the reference phase
public void insertPhaseBefore(PipelinePhase reference, PipelinePhase phase)
Inserts phase before the reference phase
public boolean isEmpty()
true if there are no interceptors installed regardless number of phasespublic void intercept(PipelinePhase phase, kotlin.jvm.functions.Function3<? super io.ktor.util.pipeline.PipelineContext<TSubject,TContext>,? super TSubject,? super kotlin.coroutines.experimental.Continuation<? super kotlin.Unit>,? extends java.lang.Object> block)
Adds block to the phase of this pipeline
public void afterIntercepted()
Invoked after an interceptor has been installed
public void merge(Pipeline<TSubject,TContext> from)
Merges another pipeline into this pipeline, maintaining relative phases order