BaseApplicationEngine

abstract class BaseApplicationEngine : ApplicationEngine

Base class for implementing ApplicationEngine

It creates default engine pipeline, provides application property and installs default transformations on respond and receive

Parameters

environment - instance of ApplicationEngineEnvironment for this engine

pipeline - pipeline to use with this engine

Types

Configuration

open class Configuration : Configuration

Configuration for the BaseApplicationEngine

Constructors

<init>

BaseApplicationEngine(
    environment: ApplicationEngineEnvironment,
    pipeline: EnginePipeline = defaultEnginePipeline(environment))

Base class for implementing ApplicationEngine

Properties

environment

instance of ApplicationEngineEnvironment for this engine

pipeline

val pipeline: EnginePipeline

pipeline to use with this engine

Inherited Properties

application

open val application: Application

Currently running application instance

Inherited Functions

start

abstract fun start(wait: Boolean = false): ApplicationEngine

Starts this ApplicationEngine

stop

abstract fun stop(
    gracePeriod: Long,
    timeout: Long,
    timeUnit: TimeUnit
): Unit

Stops this ApplicationEngine

Extension Functions

stopServerOnCancellation

fun ApplicationEngine.stopServerOnCancellation(): CompletableJob

Stop server on job cancellation. The returned deferred need to be completed or cancelled.

Inheritors

CIOApplicationEngine

class CIOApplicationEngine : BaseApplicationEngine

Engine that based on CIO backend

JettyApplicationEngineBase

open class JettyApplicationEngineBase : BaseApplicationEngine

ApplicationEngine base type for running in a standalone Jetty

NettyApplicationEngine

class NettyApplicationEngine : BaseApplicationEngine

ApplicationEngine implementation for running in a standalone Netty

TestApplicationEngine

class TestApplicationEngine : 
    BaseApplicationEngine,
    CoroutineScope

ktor test engine that provides way to simulate application calls to existing application module(s) without actual HTTP connection

TomcatApplicationEngine

class TomcatApplicationEngine : BaseApplicationEngine

Tomcat application engine that runs it in embedded mode