ServletService
class ServletService(port: Int, servletGroup: ServletGroup, host: String? = null, initBlock: ServletService.() -> Unit = {}) : GenericIdleService
A Guava GenericIdleService that runs an embedded Jetty server to host servlets from a ServletGroup.
Each servlet in the group is registered under the root context path (/) at its path, given with or without a leading slash. The service manages the Jetty server lifecycle, starting it on startUp and stopping it on shutDown.
Used by GenericService for serving administrative endpoints (ping, version, health check, thread dump).
Parameters
port
The HTTP port for the Jetty server.
servletGroup
The ServletGroup containing servlets to register.
host
The interface to bind to, or null to bind every interface.
initBlock
An optional initialization block invoked after the service listener is registered.
Constructors
Link copied to clipboard
constructor(port: Int, servletGroup: ServletGroup, host: String? = null, initBlock: ServletService.() -> Unit = {})