T
- The server typepublic abstract class AbstractServletServer<T>
extends java.lang.Object
implements io.micronaut.runtime.server.EmbeddedServer
Modifier | Constructor and Description |
---|---|
protected |
AbstractServletServer(io.micronaut.context.ApplicationContext applicationContext,
io.micronaut.runtime.ApplicationConfiguration applicationConfiguration,
T server)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
io.micronaut.runtime.ApplicationConfiguration |
getApplicationConfiguration() |
io.micronaut.context.ApplicationContext |
getApplicationContext() |
T |
getServer() |
io.micronaut.runtime.server.EmbeddedServer |
start() |
protected abstract void |
startServer()
Start the server.
|
io.micronaut.runtime.server.EmbeddedServer |
stop() |
protected abstract void |
stopServer()
Stop the server.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHost, getPort, getScheme, getURI, getURL, isKeepAlive, isServer
protected AbstractServletServer(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.runtime.ApplicationConfiguration applicationConfiguration, T server)
applicationContext
- The application contextapplicationConfiguration
- The application configurationserver
- The server objectpublic final T getServer()
public final io.micronaut.context.ApplicationContext getApplicationContext()
getApplicationContext
in interface io.micronaut.context.ApplicationContextProvider
getApplicationContext
in interface io.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>
public final io.micronaut.runtime.ApplicationConfiguration getApplicationConfiguration()
getApplicationConfiguration
in interface io.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>
public final io.micronaut.runtime.server.EmbeddedServer start()
start
in interface io.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>
start
in interface io.micronaut.context.LifeCycle
public final io.micronaut.runtime.server.EmbeddedServer stop()
stop
in interface io.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>
stop
in interface io.micronaut.context.LifeCycle
protected abstract void startServer() throws java.lang.Exception
java.lang.Exception
- when an error occurred starting the serverprotected abstract void stopServer() throws java.lang.Exception
java.lang.Exception
- when an error occurred stopping the server