ApplicationEngine

An engine which runs an application.

Inheritors

Types

Link copied to clipboard
open class Configuration

A configuration for the ApplicationEngine.

Properties

Link copied to clipboard

An environment used to run this engine.

Functions

Link copied to clipboard

Local addresses for application connectors. If environment's connectors was configured to use port=0, you can use this function to get an actual port for these connectors. Available after a server is started.

Link copied to clipboard
abstract fun start(wait: Boolean = false): ApplicationEngine

Starts this ApplicationEngine.

Link copied to clipboard
open suspend fun startSuspend(wait: Boolean = false): ApplicationEngine

Starts this ApplicationEngine.

Link copied to clipboard
abstract fun stop(gracePeriodMillis: Long = 500, timeoutMillis: Long = 500)

Stops this ApplicationEngine.

Link copied to clipboard
fun ApplicationEngine.stopServerOnCancellation(application: Application, gracePeriodMillis: Long = 50, timeoutMillis: Long = 5000): CompletableJob

Stop server on job cancellation. The returned CompletableJob needs to be completed or cancelled.

Link copied to clipboard
open suspend fun stopSuspend(gracePeriodMillis: Long = 500, timeoutMillis: Long = 500)

Stops this ApplicationEngine.