@Introspected
public class MicronautLambdaHandler
extends java.lang.Object
implements com.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.serverless.proxy.model.AwsProxyRequest,com.amazonaws.serverless.proxy.model.AwsProxyResponse>, io.micronaut.context.ApplicationContextProvider, java.io.Closeable
RequestHandler
for AwsProxyRequest
and AwsProxyResponse
.Modifier and Type | Field and Description |
---|---|
protected MicronautLambdaContainerHandler |
handler |
Constructor and Description |
---|
MicronautLambdaHandler()
Constructor.
|
MicronautLambdaHandler(io.micronaut.context.ApplicationContext applicationContext)
Constructor.
|
MicronautLambdaHandler(io.micronaut.context.ApplicationContextBuilder applicationContextBuilder)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
io.micronaut.context.ApplicationContext |
getApplicationContext() |
com.amazonaws.serverless.proxy.model.AwsProxyResponse |
handleRequest(com.amazonaws.serverless.proxy.model.AwsProxyRequest input,
com.amazonaws.services.lambda.runtime.Context context) |
protected final MicronautLambdaContainerHandler handler
public MicronautLambdaHandler() throws com.amazonaws.serverless.exceptions.ContainerInitializationException
com.amazonaws.serverless.exceptions.ContainerInitializationException
- thrown intializing MicronautLambdaHandler
public MicronautLambdaHandler(io.micronaut.context.ApplicationContextBuilder applicationContextBuilder) throws com.amazonaws.serverless.exceptions.ContainerInitializationException
applicationContextBuilder
- Application Context Buildercom.amazonaws.serverless.exceptions.ContainerInitializationException
- thrown initializing MicronautLambdaHandler
public MicronautLambdaHandler(io.micronaut.context.ApplicationContext applicationContext) throws com.amazonaws.serverless.exceptions.ContainerInitializationException
applicationContext
- Application Context (must be started already)com.amazonaws.serverless.exceptions.ContainerInitializationException
- thrown initializing MicronautLambdaHandler
public com.amazonaws.serverless.proxy.model.AwsProxyResponse handleRequest(com.amazonaws.serverless.proxy.model.AwsProxyRequest input, com.amazonaws.services.lambda.runtime.Context context)
handleRequest
in interface com.amazonaws.services.lambda.runtime.RequestHandler<com.amazonaws.serverless.proxy.model.AwsProxyRequest,com.amazonaws.serverless.proxy.model.AwsProxyResponse>
public io.micronaut.context.ApplicationContext getApplicationContext()
getApplicationContext
in interface io.micronaut.context.ApplicationContextProvider
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable