Package io.ktor.server.engine
Types
interface ApplicationEngine Engine which runs an application |
|
interface ApplicationEngineEnvironment : Represents an environment in which engine runs. |
|
class ApplicationEngineEnvironmentBuilder Engine environment configuration builder |
|
class ApplicationEngineEnvironmentReloading : 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 : 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 : 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 |
Annotations
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 |
Extensions for External Classes
Functions
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( Creates ApplicationEngineEnvironment using ApplicationEngineEnvironmentBuilder. |
|
fun commandLineEnvironment( Creates an ApplicationEngineEnvironment instance from command line arguments |
|
fun ApplicationEngineEnvironmentBuilder.connector( Adds a non-secure connector to this engine environment |
|
fun defaultEnginePipeline( Default engine pipeline for all engines. Use it only if you are writing your own application engine implementation. |
|
fun defaultExceptionStatusCode( Map cause to the corresponding status code or |
|
fun <TEngine : ApplicationEngine, TConfiguration : Configuration> embeddedServer( Creates an embedded server with the given factory, listening on host:port fun <TEngine : ApplicationEngine, TConfiguration : Configuration> embeddedServer( Creates an embedded server with the given factory, environment and configure script |
|
suspend fun handleFailure( |
|
fun ApplicationSendPipeline.installDefaultTransformations(): Unit Default send transformation fun ApplicationReceivePipeline.installDefaultTransformations(): Unit Default receive transformation |
|
fun Configuration.loadCommonConfiguration( Load engine’s configuration suitable for all engines from deploymentConfig |
|
suspend fun logError( |
|
fun ApplicationEngineEnvironmentBuilder.sslConnector( Adds a secure connector to this engine environment |
|
fun ApplicationEngine.stop( Stops this ApplicationEngine |
|
fun ApplicationEngine.stopServerOnCancellation(): CompletableJob Stop server on job cancellation. The returned deferred need to be completed or cancelled. |