ApplicationEngineEnvironmentReloading

class ApplicationEngineEnvironmentReloading : 
    ApplicationEngineEnvironment

Implements ApplicationEngineEnvironment by loading an Application from a folder or jar.

watchPaths specifies substrings to match against class path entries to monitor changes in folder/jar and implements hot reloading

Constructors

<init>

ApplicationEngineEnvironmentReloading(
    classLoader: ClassLoader,
    log: Logger,
    config: ApplicationConfig,
    connectors: List<EngineConnectorConfig>,
    modules: List<Application.() -> Unit>,
    watchPaths: List<String> = emptyList(),
    parentCoroutineContext: <ERROR CLASS> = EmptyCoroutineContext)
ApplicationEngineEnvironmentReloading(
    classLoader: ClassLoader,
    log: Logger,
    config: ApplicationConfig,
    connectors: List<EngineConnectorConfig>,
    modules: List<Application.() -> Unit>,
    watchPaths: List<String> = emptyList(),
    parentCoroutineContext: <ERROR CLASS> = EmptyCoroutineContext,
    rootPath: String = "")

Implements ApplicationEngineEnvironment by loading an Application from a folder or jar.

Properties

application

val application: Application

Running Application

classLoader

val classLoader: ClassLoader

ClassLoader used to load application.

config

val config: ApplicationConfig

Configuration for the Application

connectors

val connectors: List<EngineConnectorConfig>

Connectors that describers where and how server should listen

log

val log: Logger

Instance of Logger to be used for logging.

monitor

val monitor: ApplicationEvents

Provides events on Application lifecycle

parentCoroutineContext

val parentCoroutineContext: <ERROR CLASS>

Parent coroutine context for an application

rootPath

val rootPath: String

Application’s root path (prefix, context path in servlet container).

Functions

reload

fun reload(): Unit

Reload application: destroy it first and then create again

start

fun start(): Unit

Starts ApplicationEngineEnvironment and creates an application

stop

fun stop(): Unit

Stops ApplicationEngineEnvironment and destroys any running application