ApplicationCallPipeline

open class ApplicationCallPipeline : 
    Pipeline<Unit, ApplicationCall>

Pipeline configuration for executing ApplicationCall instances

Constructors

<init>

ApplicationCallPipeline()

Pipeline configuration for executing ApplicationCall instances

Properties

receivePipeline

val receivePipeline: ApplicationReceivePipeline

Pipeline for receiving content

sendPipeline

val sendPipeline: ApplicationSendPipeline

Pipeline for sending content

Inherited Properties

attributes

val attributes: Attributes

Provides common place to store pipeline attributes

isEmpty

val isEmpty: Boolean

items

val items: List<PipelinePhase>

Phases of this pipeline

Inherited Functions

addPhase

fun addPhase(phase: PipelinePhase): Unit

Adds phase to the end of this pipeline

afterIntercepted

open fun afterIntercepted(): Unit

Invoked after an interceptor has been installed

execute

suspend fun execute(
    context: TContext,
    subject: TSubject
): TSubject

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

insertPhaseAfter

fun insertPhaseAfter(
    reference: PipelinePhase,
    phase: PipelinePhase
): Unit

Inserts phase after the reference phase

insertPhaseBefore

fun insertPhaseBefore(
    reference: PipelinePhase,
    phase: PipelinePhase
): Unit

Inserts phase before the reference phase

intercept

fun intercept(
    phase: PipelinePhase,
    block: PipelineInterceptor<TSubject, TContext>
): Unit

Adds block to the phase of this pipeline

merge

fun merge(from: Pipeline<TSubject, TContext>): Unit

Merges another pipeline into this pipeline, maintaining relative phases order

Companion Object Properties

Call

val Call: PipelinePhase

Phase for processing a call and sending a response

Fallback

val Fallback: PipelinePhase

Phase for handling unprocessed calls

Features

val Features: PipelinePhase

Phase for features. Most features should intercept this phase.

Monitoring

val Monitoring: PipelinePhase

Phase for tracing calls, useful for logging, metrics, error handling and so on

Setup

val Setup: PipelinePhase

Phase for preparing call and it’s attributes for processing

Extension Properties

conversionService

Lookup for a conversion service. Returns the default one if the feature wasn’t installed

Extension Functions

execute

suspend fun <TContext : Any> Pipeline<Unit, TContext>.execute(
    context: TContext
): Unit

Executes this pipeline

intercept

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

Inheritors

Application

class Application : ApplicationCallPipeline, CoroutineScope

Represents configured and running web application, capable of handling requests. It is also the application coroutine scope that is cancelled immediately at application stop so useful for launching background coroutines.

Route

open class Route : ApplicationCallPipeline

Describes a node in a routing tree