ContainerResponseType - The response object expceted from the underlying containerResponseType - The type for the Lambda function return valuepublic abstract class ResponseWriter<ContainerResponseType,ResponseType>
extends java.lang.Object
ContainerResponseType type could be a response model object
or a ResponseReader implementation. For example, the Jersey library passes the response reader object to
the default implementation of this class.| Constructor and Description |
|---|
ResponseWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
isValidUtf8(byte[] input)
Checks whether the given byte array contains a UTF-8 encoded string
|
abstract ResponseType |
writeResponse(ContainerResponseType containerResponse,
com.amazonaws.services.lambda.runtime.Context lambdaContext)
Writes status code, headers, and body from the container response to a Lambda return value.
|
public abstract ResponseType writeResponse(ContainerResponseType containerResponse, com.amazonaws.services.lambda.runtime.Context lambdaContext) throws InvalidResponseObjectException
containerResponse - The container response or response reader objectlambdaContext - The context for the Lambda function executionInvalidResponseObjectException - When the implementation cannot read the container response objectprotected boolean isValidUtf8(byte[] input)
input - The byte[] to check againstCopyright © 2018. All Rights Reserved.