RequestType - The type for the AWS Lambda eventContainerRequestType - The type for the undelying container request objectpublic abstract class RequestReader<RequestType,ContainerRequestType>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
API_GATEWAY_CONTEXT_PROPERTY
The key for the API Gateway context property in the PropertiesDelegate object
|
static java.lang.String |
API_GATEWAY_EVENT_PROPERTY
The key to store the entire API Gateway event
|
static java.lang.String |
API_GATEWAY_STAGE_VARS_PROPERTY
The key for the API Gateway stage variables property in the PropertiesDelegate object
|
static java.lang.String |
JAX_SECURITY_CONTEXT_PROPERTY
The key for the JAX RS security context properties stored in the request attributes
|
static java.lang.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 java.lang.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 java.lang.String |
stripBasePath(java.lang.String requestPath,
ContainerConfig config)
Strips the base path from the request path if the container configuration object requires it
|
public static final java.lang.String API_GATEWAY_CONTEXT_PROPERTY
public static final java.lang.String API_GATEWAY_STAGE_VARS_PROPERTY
public static final java.lang.String API_GATEWAY_EVENT_PROPERTY
public static final java.lang.String LAMBDA_CONTEXT_PROPERTY
public static final java.lang.String JAX_SECURITY_CONTEXT_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 java.lang.Class<? extends RequestType> getRequestClass()
protected java.lang.String stripBasePath(java.lang.String requestPath,
ContainerConfig config)
requestPath - The incoming request pathconfig - The container configuration objectCopyright © 2018. All Rights Reserved.