RequestType - The expected request object. This is the model class that the event JSON is de-serialized toResponseType - The expected Lambda function response object. Responses from the container will be written to this model objectContainerRequestType - The request type for the wrapped Java containerContainerResponseType - The response or response writer type for the wrapped Java containerpublic abstract class LambdaContainerHandler<RequestType,ResponseType,ContainerRequestType,ContainerResponseType>
extends java.lang.Object
LambdaContainerHandler.| Modifier and Type | Field and Description |
|---|---|
protected com.amazonaws.services.lambda.runtime.Context |
lambdaContext |
static java.lang.String |
SERVER_INFO |
| Modifier | Constructor and Description |
|---|---|
protected |
LambdaContainerHandler(RequestReader<RequestType,ContainerRequestType> requestReader,
ResponseWriter<ContainerResponseType,ResponseType> responseWriter,
SecurityContextWriter<RequestType> securityContextWriter,
ExceptionHandler<ResponseType> exceptionHandler) |
| Modifier and Type | Method and Description |
|---|---|
static ContainerConfig |
getContainerConfig()
Returns the current container configuration object.
|
protected abstract ContainerResponseType |
getContainerResponse(ContainerRequestType request,
java.util.concurrent.CountDownLatch latch) |
protected abstract void |
handleRequest(ContainerRequestType containerRequest,
ContainerResponseType containerResponse,
com.amazonaws.services.lambda.runtime.Context lambdaContext) |
ResponseType |
proxy(RequestType request,
com.amazonaws.services.lambda.runtime.Context context)
Proxies requests to the underlying container given the incoming Lambda request.
|
void |
stripBasePath(java.lang.String basePath)
Configures the library to strip a base path from incoming requests before passing them on to the wrapped
framework.
|
public static final java.lang.String SERVER_INFO
protected com.amazonaws.services.lambda.runtime.Context lambdaContext
protected LambdaContainerHandler(RequestReader<RequestType,ContainerRequestType> requestReader, ResponseWriter<ContainerResponseType,ResponseType> responseWriter, SecurityContextWriter<RequestType> securityContextWriter, ExceptionHandler<ResponseType> exceptionHandler)
protected abstract ContainerResponseType getContainerResponse(ContainerRequestType request, java.util.concurrent.CountDownLatch latch)
protected abstract void handleRequest(ContainerRequestType containerRequest, ContainerResponseType containerResponse, com.amazonaws.services.lambda.runtime.Context lambdaContext) throws java.lang.Exception
java.lang.Exceptionpublic void stripBasePath(java.lang.String basePath)
basePath - The base path to be stripped from the requestpublic ResponseType proxy(RequestType request, com.amazonaws.services.lambda.runtime.Context context)
request - The incoming Lambda requestcontext - The execution context for the Lambda functionpublic static ContainerConfig getContainerConfig()
Copyright © 2017. All Rights Reserved.