interface ApplicationEngine
Engine which runs an application |
|
interface ApplicationEngineEnvironment : ApplicationEnvironment
Represents an environment in which engine runs. |
|
class ApplicationEngineEnvironmentBuilder
Engine environment configuration builder |
|
class ApplicationEngineEnvironmentReloading : ApplicationEngineEnvironment
Implements ApplicationEngineEnvironment by loading an Application from a folder or jar. |
|
interface ApplicationEngineFactory<out TEngine : ApplicationEngine, TConfiguration : Configuration>
Factory interface for creating ApplicationEngine instances |
|
abstract class BaseApplicationCall : ApplicationCall
Base class for implementing an ApplicationCall. |
|
abstract class BaseApplicationEngine : ApplicationEngine
Base class for implementing ApplicationEngine |
|
abstract class BaseApplicationRequest : ApplicationRequest
Base class for implementing ApplicationRequest |
|
abstract class BaseApplicationResponse : ApplicationResponse
Base class for implementing an ApplicationResponse |
|
data class ConnectorType
Represents a type of a connector, e.g HTTP or HTTPS. |
|
class DefaultUncaughtExceptionHandler : CoroutineExceptionHandler
Handles all uncaught exceptions and logs errors with the specified logger ignoring CancellationException and IOException. |
|
open class EngineConnectorBuilder : EngineConnectorConfig
Mutable implementation of EngineConnectorConfig for building connectors programmatically |
|
interface EngineConnectorConfig
Represents a connector configuration. |
|
class EnginePipeline : Pipeline<Unit, ApplicationCall>
Application engine pipeline. One usually don't need to install interceptors here unless your are writing your own engine implementation |
|
class EngineSSLConnectorBuilder : EngineConnectorBuilder, EngineSSLConnectorConfig
Mutable implementation of EngineSSLConnectorConfig for building connectors programmatically |
|
interface EngineSSLConnectorConfig : EngineConnectorConfig
Represents an SSL connector configuration. |
|
class ShutDownUrl
Shutdown URL feature. It stops application when requested particular url |
annotation class EngineAPI
API marked with this annotation is not intended to be used by end users unless a custom server engine implementation is required |
fun ApplicationEngine.addShutdownHook(stop: () -> Unit): Unit
Adds automatic JVM shutdown hooks management. Should be used before starting the engine. Once JVM termination noticed, stop block will be executed. Please note that a shutdown hook only registered when the application is running. If the application is already stopped then there will be no hook and no stop function invocation possible. So stop block will be called once or never. |
|
fun applicationEngineEnvironment(builder: ApplicationEngineEnvironmentBuilder.() -> Unit): ApplicationEngineEnvironment
Creates ApplicationEngineEnvironment using ApplicationEngineEnvironmentBuilder. |
|
fun commandLineEnvironment(args: Array<String>): ApplicationEngineEnvironment
Creates an ApplicationEngineEnvironment instance from command line arguments |
|
fun ApplicationEngineEnvironmentBuilder.connector(builder: EngineConnectorBuilder.() -> Unit): Unit
Adds a non-secure connector to this engine environment |
|
fun defaultEnginePipeline(environment: ApplicationEnvironment): EnginePipeline
Default engine pipeline for all engines. Use it only if you are writing your own application engine implementation. |
|
fun defaultExceptionStatusCode(cause: Throwable): HttpStatusCode?
Map cause to the corresponding status code or |
|
fun <TEngine : ApplicationEngine, TConfiguration : Configuration> embeddedServer(factory: ApplicationEngineFactory<TEngine, TConfiguration>, port: Int = 80, host: String = "0.0.0.0", watchPaths: List<String> = listOf(WORKING_DIRECTORY_PATH), configure: TConfiguration.() -> Unit = {}, module: Application.() -> Unit): TEngine
Creates an embedded server with the given factory, listening on host:port fun <TEngine : ApplicationEngine, TConfiguration : Configuration> embeddedServer(factory: ApplicationEngineFactory<TEngine, TConfiguration>, environment: ApplicationEngineEnvironment, configure: TConfiguration.() -> Unit = {}): TEngine
Creates an embedded server with the given factory, environment and configure script |
|
suspend fun handleFailure(call: ApplicationCall, error: Throwable): Unit |
|
fun Configuration.loadCommonConfiguration(deploymentConfig: ApplicationConfig): Unit
Load engine's configuration suitable for all engines from deploymentConfig |
|
suspend fun logError(call: ApplicationCall, error: Throwable): Unit |
|
fun ApplicationEngineEnvironmentBuilder.sslConnector(keyStore: KeyStore, keyAlias: String, keyStorePassword: () -> CharArray, privateKeyPassword: () -> CharArray, builder: EngineSSLConnectorBuilder.() -> Unit): Unit
Adds a secure connector to this engine environment |
|
fun ApplicationEngine.stop(gracePeriod: Long, timeout: Long, timeUnit: TimeUnit): Unit
Stops this ApplicationEngine |
|
fun ApplicationEngine.stopServerOnCancellation(): CompletableJob
Stop server on job cancellation. The returned deferred need to be completed or cancelled. |