@Primary
@Order(value=-100)
@Requires(property="micronaut.test.server.executable") @Requires(beans=io.micronaut.http.server.HttpServerConfiguration.class)
@Singleton
public class TestExecutableEmbeddedServer
extends java.lang.Object
implements io.micronaut.runtime.server.EmbeddedServer
EmbeddedServer
implementation that runs an external executable JAR or native.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROPERTY |
Modifier | Constructor and Description |
---|---|
protected |
TestExecutableEmbeddedServer(java.lang.String executable,
io.micronaut.context.ApplicationContext applicationContext,
io.micronaut.http.server.HttpServerConfiguration httpServerConfiguration)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
io.micronaut.runtime.ApplicationConfiguration |
getApplicationConfiguration() |
io.micronaut.context.ApplicationContext |
getApplicationContext() |
java.lang.String |
getHost() |
int |
getPort() |
java.lang.String |
getScheme() |
java.net.URI |
getURI() |
java.net.URL |
getURL() |
boolean |
isRunning() |
io.micronaut.runtime.server.EmbeddedServer |
start() |
io.micronaut.runtime.server.EmbeddedServer |
stop() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String PROPERTY
@Internal protected TestExecutableEmbeddedServer(@Property(name="micronaut.test.server.executable") java.lang.String executable, io.micronaut.context.ApplicationContext applicationContext, io.micronaut.http.server.HttpServerConfiguration httpServerConfiguration)
executable
- The executable to runapplicationContext
- The contexthttpServerConfiguration
- The server configurationpublic int getPort()
getPort
in interface io.micronaut.runtime.server.EmbeddedServer
public java.lang.String getHost()
getHost
in interface io.micronaut.runtime.server.EmbeddedServer
public java.lang.String getScheme()
getScheme
in interface io.micronaut.runtime.server.EmbeddedServer
public java.net.URL getURL()
getURL
in interface io.micronaut.runtime.server.EmbeddedServer
public java.net.URI getURI()
getURI
in interface io.micronaut.runtime.server.EmbeddedServer
public 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 io.micronaut.runtime.ApplicationConfiguration getApplicationConfiguration()
getApplicationConfiguration
in interface io.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>
public boolean isRunning()
isRunning
in interface io.micronaut.context.LifeCycle
public 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 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