Class AwsApiProxyTestServer
java.lang.Object
io.micronaut.function.aws.proxy.test.AwsApiProxyTestServer
- All Implemented Interfaces:
io.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>
,io.micronaut.context.ApplicationContextProvider
,io.micronaut.context.LifeCycle
,io.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>
,io.micronaut.runtime.server.EmbeddedServer
,Closeable
,AutoCloseable
@Singleton
@Internal
public class AwsApiProxyTestServer
extends Object
implements io.micronaut.runtime.server.EmbeddedServer
Implementation that spins up an HTTP server based on Jetty that proxies request to a Lambda.
- Since:
- 2.1.0
- Author:
- gkrocher
-
Constructor Summary
ConstructorDescriptionAwsApiProxyTestServer
(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.http.server.HttpServerConfiguration httpServerConfiguration) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.runtime.EmbeddedApplication
getEnvironment, isForceExit
Methods inherited from interface io.micronaut.runtime.server.EmbeddedServer
getContextURI, isKeepAlive, isServer
Methods inherited from interface io.micronaut.context.LifeCycle
close, refresh
-
Constructor Details
-
AwsApiProxyTestServer
public AwsApiProxyTestServer(io.micronaut.context.ApplicationContext applicationContext, io.micronaut.http.server.HttpServerConfiguration httpServerConfiguration)
-
-
Method Details
-
start
public io.micronaut.runtime.server.EmbeddedServer start()- Specified by:
start
in interfaceio.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>
- Specified by:
start
in interfaceio.micronaut.context.LifeCycle
-
stop
public io.micronaut.runtime.server.EmbeddedServer stop()- Specified by:
stop
in interfaceio.micronaut.context.ApplicationContextLifeCycle<io.micronaut.runtime.server.EmbeddedServer>
- Specified by:
stop
in interfaceio.micronaut.context.LifeCycle
-
getPort
public int getPort()- Specified by:
getPort
in interfaceio.micronaut.runtime.server.EmbeddedServer
-
getHost
- Specified by:
getHost
in interfaceio.micronaut.runtime.server.EmbeddedServer
-
getScheme
- Specified by:
getScheme
in interfaceio.micronaut.runtime.server.EmbeddedServer
-
getURL
- Specified by:
getURL
in interfaceio.micronaut.runtime.server.EmbeddedServer
-
getURI
- Specified by:
getURI
in interfaceio.micronaut.runtime.server.EmbeddedServer
-
getApplicationContext
public io.micronaut.context.ApplicationContext getApplicationContext()- Specified by:
getApplicationContext
in interfaceio.micronaut.context.ApplicationContextProvider
- Specified by:
getApplicationContext
in interfaceio.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>
-
getApplicationConfiguration
public io.micronaut.runtime.ApplicationConfiguration getApplicationConfiguration()- Specified by:
getApplicationConfiguration
in interfaceio.micronaut.runtime.EmbeddedApplication<io.micronaut.runtime.server.EmbeddedServer>
-
isRunning
public boolean isRunning()- Specified by:
isRunning
in interfaceio.micronaut.context.LifeCycle
-