RequestType - The incoming event typeResponseType - The expected return typepublic class SpringLambdaContainerHandler<RequestType,ResponseType> extends LambdaContainerHandler<RequestType,ResponseType,AwsProxyHttpServletRequest,AwsHttpServletResponse>
| Constructor and Description |
|---|
SpringLambdaContainerHandler(RequestReader<RequestType,AwsProxyHttpServletRequest> requestReader,
ResponseWriter<AwsHttpServletResponse,ResponseType> responseWriter,
SecurityContextWriter<RequestType> securityContextWriter,
ExceptionHandler<ResponseType> exceptionHandler,
org.springframework.web.context.ConfigurableWebApplicationContext applicationContext)
Creates a new container handler with the given reader and writer objects
|
| Modifier and Type | Method and Description |
|---|---|
static SpringLambdaContainerHandler<AwsProxyRequest,AwsProxyResponse> |
getAwsProxyHandler(Class... config)
Creates a default SpringLambdaContainerHandler initialized with the `AwsProxyRequest` and `AwsProxyResponse` objects
|
static SpringLambdaContainerHandler<AwsProxyRequest,AwsProxyResponse> |
getAwsProxyHandler(org.springframework.web.context.ConfigurableWebApplicationContext applicationContext)
Creates a default SpringLambdaContainerHandler initialized with the `AwsProxyRequest` and `AwsProxyResponse` objects
|
protected AwsHttpServletResponse |
getContainerResponse(CountDownLatch latch) |
protected void |
handleRequest(AwsProxyHttpServletRequest containerRequest,
AwsHttpServletResponse containerResponse,
com.amazonaws.services.lambda.runtime.Context lambdaContext) |
void |
setRefreshContext(boolean refreshContext) |
proxypublic SpringLambdaContainerHandler(RequestReader<RequestType,AwsProxyHttpServletRequest> requestReader, ResponseWriter<AwsHttpServletResponse,ResponseType> responseWriter, SecurityContextWriter<RequestType> securityContextWriter, ExceptionHandler<ResponseType> exceptionHandler, org.springframework.web.context.ConfigurableWebApplicationContext applicationContext) throws ContainerInitializationException
requestReader - An implementation of `RequestReader`responseWriter - An implementation of `ResponseWriter`securityContextWriter - An implementation of `SecurityContextWriter`exceptionHandler - An implementation of `ExceptionHandler`ContainerInitializationExceptionpublic static SpringLambdaContainerHandler<AwsProxyRequest,AwsProxyResponse> getAwsProxyHandler(Class... config) throws ContainerInitializationException
config - A set of classes annotated with the Spring @Configuration annotationContainerInitializationExceptionpublic static SpringLambdaContainerHandler<AwsProxyRequest,AwsProxyResponse> getAwsProxyHandler(org.springframework.web.context.ConfigurableWebApplicationContext applicationContext) throws ContainerInitializationException
applicationContext - A custom ConfigurableWebApplicationContext to be usedContainerInitializationExceptionpublic void setRefreshContext(boolean refreshContext)
protected AwsHttpServletResponse getContainerResponse(CountDownLatch latch)
getContainerResponse in class LambdaContainerHandler<RequestType,ResponseType,AwsProxyHttpServletRequest,AwsHttpServletResponse>protected void handleRequest(AwsProxyHttpServletRequest containerRequest, AwsHttpServletResponse containerResponse, com.amazonaws.services.lambda.runtime.Context lambdaContext) throws Exception
handleRequest in class LambdaContainerHandler<RequestType,ResponseType,AwsProxyHttpServletRequest,AwsHttpServletResponse>ExceptionCopyright © 2017. All Rights Reserved.