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.
Parameters
environment
- Instance of ApplicationEnvironment describing environment this application runs in
Constructors
Application(environment: ApplicationEnvironment) 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. |
Properties
val coroutineContext: <ERROR CLASS> |
|
val environment: ApplicationEnvironment Instance of ApplicationEnvironment describing environment this application runs in |
Inherited Properties
val receivePipeline: ApplicationReceivePipeline Pipeline for receiving content |
|
val sendPipeline: ApplicationSendPipeline Pipeline for sending content |
Functions
fun dispose(): Unit Called by ApplicationEngine when Application is terminated |
Extension Properties
val ApplicationCallPipeline.conversionService: ConversionService Lookup for a conversion service. Returns the default one if the feature wasn’t installed |
|
val Application.locations: Locations Gets the Application.locations feature |
|
val Application.log: Logger Convenience property to access log from application |
Extension Functions
fun Application.authentication( Installs Authentication feature if not yet installed and invokes block on it’s config. One is allowed to modify existing authentication configuration only in authentication’s block or via Authentication.configure function. Changing captured instance of configuration outside of block may have no effect or damage application’s state. |
|
fun CoroutineScope. fun CoroutineScope.decodeChunked( Start a chunked stream decoder coroutine |
|
fun <TEngine : ApplicationEngine, TConfiguration : Configuration> CoroutineScope.embeddedServer( Creates an embedded server with the given factory, listening on host:port |
|
Executes this pipeline |
|
fun CoroutineScope.httpServer( Start an http server with settings invoking handler for every request |
|
fun <TSubject : Any, TContext : Any> Pipeline<*, TContext>.intercept( Intercepts an untyped pipeline when the subject is of the given type |
|
fun CoroutineScope.parseMultipart( fun CoroutineScope.parseMultipart( fun CoroutineScope.parseMultipart( Starts a multipart parser coroutine producing multipart events |
|
fun CoroutineScope.pinger( Launch pinger coroutine on CoroutineScope that is sending ping every specified period to outgoing channel, waiting for and verifying client’s pong frames. It is also handling timeout and sending timeout close frame fun CoroutineScope.pinger( Launch pinger coroutine on CoroutineScope that is sending ping every specified periodMillis to outgoing channel, waiting for and verifying client’s pong frames. It is also handling timeoutMillis and sending timeout close frame |
|
fun CoroutineScope.pinger( Launch pinger coroutine on CoroutineScope that is sending ping every specified period to outgoing channel, waiting for and verifying client’s pong frames. It is also handling timeout and sending timeout close frame |
|
fun CoroutineScope.ponger( Launch a ponger actor job on the CoroutineScope sending pongs to outgoing channel. It is acting for every client’s ping frame and replying with corresponding pong |
|
fun CoroutineScope.reader( fun CoroutineScope.reader( |
|
fun Application.routing( Gets or installs a Routing feature for the this Application and runs a configuration script on it |
|
fun CoroutineScope.startConnectionPipeline( Start connection HTTP pipeline invoking handler for every request. Note that handler could be invoked multiple times concurrently due to HTTP pipeline nature |
|
fun Application.webSockets(): Unit |
|
fun CoroutineScope.writeMultipleRanges( Start multirange response writer coroutine |
|
fun CoroutineScope.writer( fun CoroutineScope.writer( |