public class MicronautRequestStreamHandler extends io.micronaut.function.executor.StreamFunctionExecutor<com.amazonaws.services.lambda.runtime.Context> implements com.amazonaws.services.lambda.runtime.RequestStreamHandler, MicronautLambdaContext
An implementation of the RequestStreamHandler
for Micronaut
ENVIRONMENT_LAMBDA
Constructor and Description |
---|
MicronautRequestStreamHandler()
Default constructor; will initialize a suitable
ApplicationContext for
Lambda deployment. |
MicronautRequestStreamHandler(io.micronaut.context.ApplicationContext applicationContext)
Constructor used to inject a preexisting
ApplicationContext . |
Modifier and Type | Method and Description |
---|---|
protected io.micronaut.context.ApplicationContext |
buildApplicationContext(com.amazonaws.services.lambda.runtime.Context context) |
void |
close() |
void |
handleRequest(java.io.InputStream input,
java.io.OutputStream output,
com.amazonaws.services.lambda.runtime.Context context) |
protected io.micronaut.context.ApplicationContextBuilder |
newApplicationContextBuilder() |
protected java.lang.String |
resolveFunctionName(io.micronaut.context.env.Environment env) |
public MicronautRequestStreamHandler()
ApplicationContext
for
Lambda deployment.public MicronautRequestStreamHandler(io.micronaut.context.ApplicationContext applicationContext)
ApplicationContext
.applicationContext
- the application contextpublic void handleRequest(java.io.InputStream input, java.io.OutputStream output, com.amazonaws.services.lambda.runtime.Context context) throws java.io.IOException
handleRequest
in interface com.amazonaws.services.lambda.runtime.RequestStreamHandler
java.io.IOException
protected io.micronaut.context.ApplicationContext buildApplicationContext(com.amazonaws.services.lambda.runtime.Context context)
buildApplicationContext
in class io.micronaut.function.executor.AbstractExecutor<com.amazonaws.services.lambda.runtime.Context>
@NonNull protected io.micronaut.context.ApplicationContextBuilder newApplicationContextBuilder()
newApplicationContextBuilder
in class io.micronaut.function.executor.AbstractExecutor<com.amazonaws.services.lambda.runtime.Context>
protected java.lang.String resolveFunctionName(io.micronaut.context.env.Environment env)
resolveFunctionName
in class io.micronaut.function.executor.AbstractExecutor<com.amazonaws.services.lambda.runtime.Context>
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class io.micronaut.function.executor.AbstractExecutor<com.amazonaws.services.lambda.runtime.Context>