RequestType - The type for the AWS Lambda eventContainerRequestType - The type for the underlying container request objectpublic abstract class RequestReader<RequestType,ContainerRequestType> extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ALB_CONTEXT_PROPERTY
The key for the ALB context property in the PropertiesDelegate object
|
static String |
API_GATEWAY_CONTEXT_PROPERTY
The key for the API Gateway context property in the PropertiesDelegate object
|
static String |
API_GATEWAY_EVENT_PROPERTY
The key to store the entire API Gateway event
|
static String |
API_GATEWAY_STAGE_VARS_PROPERTY
The key for the API Gateway stage variables property in the PropertiesDelegate object
|
static String |
HTTP_API_CONTEXT_PROPERTY
The key for the HTTP API request context passed by the services
|
static String |
HTTP_API_EVENT_PROPERTY
The key for the HTTP API proxy request event
|
static String |
HTTP_API_STAGE_VARS_PROPERTY
The key for the HTTP API stage variables
|
static String |
JAX_SECURITY_CONTEXT_PROPERTY
The key for the JAX RS security context properties stored in the request attributes
|
static String |
LAMBDA_CONTEXT_PROPERTY
The key for the AWS Lambda context property in the PropertiesDelegate object
|
| Constructor and Description |
|---|
RequestReader() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Class<? extends RequestType> |
getRequestClass() |
abstract ContainerRequestType |
readRequest(RequestType request,
javax.ws.rs.core.SecurityContext securityContext,
com.amazonaws.services.lambda.runtime.Context lambdaContext,
ContainerConfig config)
Reads the incoming event object and produces a populated request for the underlying container
|
protected String |
stripBasePath(String requestPath,
ContainerConfig config)
Strips the base path from the request path if the container configuration object requires it
|
public static final String API_GATEWAY_CONTEXT_PROPERTY
public static final String API_GATEWAY_STAGE_VARS_PROPERTY
public static final String ALB_CONTEXT_PROPERTY
public static final String API_GATEWAY_EVENT_PROPERTY
public static final String LAMBDA_CONTEXT_PROPERTY
public static final String JAX_SECURITY_CONTEXT_PROPERTY
public static final String HTTP_API_CONTEXT_PROPERTY
public static final String HTTP_API_STAGE_VARS_PROPERTY
public static final String HTTP_API_EVENT_PROPERTY
public abstract ContainerRequestType readRequest(RequestType request, javax.ws.rs.core.SecurityContext securityContext, com.amazonaws.services.lambda.runtime.Context lambdaContext, ContainerConfig config) throws InvalidRequestEventException
request - The incoming request objectsecurityContext - A jax-rs SecurityContext object (@see com.amazonaws.serverless.proxy.SecurityContextWriter)lambdaContext - The AWS Lambda context for the requestconfig - The container configuration object. This is passed in by the LambdaContainerHandler.InvalidRequestEventException - This exception is thrown if anything goes wrong during the creation of the request objectprotected abstract Class<? extends RequestType> getRequestClass()
protected String stripBasePath(String requestPath, ContainerConfig config)
requestPath - The incoming request pathconfig - The container configuration objectCopyright © 2022. All rights reserved.