Package net.officefloor.server.aws.sam
Class SamHttpResponseWriter
- java.lang.Object
-
- net.officefloor.server.aws.sam.SamHttpResponseWriter
-
- All Implemented Interfaces:
HttpResponseWriter<java.nio.ByteBuffer>
public class SamHttpResponseWriter extends java.lang.Object implements HttpResponseWriter<java.nio.ByteBuffer>
SAMHttpResponseWriter
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description SamHttpResponseWriter(StreamBufferPool<java.nio.ByteBuffer> bufferPool)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent
getApiGatewayProxyResponseEvent()
Obtains theAPIGatewayProxyResponseEvent
.void
writeHttpResponse(HttpVersion version, HttpStatus status, WritableHttpHeader headHttpHeader, WritableHttpCookie headHttpCookie, long contentLength, HttpHeaderValue contentType, StreamBuffer<java.nio.ByteBuffer> contentHeadStreamBuffer)
Writes theHttpResponse
.
-
-
-
Constructor Detail
-
SamHttpResponseWriter
public SamHttpResponseWriter(StreamBufferPool<java.nio.ByteBuffer> bufferPool)
Instantiate.- Parameters:
bufferPool
-StreamBufferPool
.
-
-
Method Detail
-
getApiGatewayProxyResponseEvent
public com.amazonaws.services.lambda.runtime.events.APIGatewayProxyResponseEvent getApiGatewayProxyResponseEvent() throws java.lang.RuntimeException
Obtains theAPIGatewayProxyResponseEvent
.- Returns:
APIGatewayProxyResponseEvent
.- Throws:
java.lang.RuntimeException
- If fails to write the response.
-
writeHttpResponse
public void writeHttpResponse(HttpVersion version, HttpStatus status, WritableHttpHeader headHttpHeader, WritableHttpCookie headHttpCookie, long contentLength, HttpHeaderValue contentType, StreamBuffer<java.nio.ByteBuffer> contentHeadStreamBuffer)
Description copied from interface:HttpResponseWriter
Writes theHttpResponse
.- Specified by:
writeHttpResponse
in interfaceHttpResponseWriter<java.nio.ByteBuffer>
- Parameters:
version
-HttpVersion
.status
-HttpStatus
.headHttpHeader
- HeadWritableHttpHeader
to the linked list ofWritableHttpHeader
instances for theHttpResponse
.headHttpCookie
- HeadWritableHttpCookie
to the linked list ofWritableHttpCookie
instances for theHttpResponse
.contentLength
- Number of bytes in the HTTP entity.contentType
-Content-Type
of the HTTP entity.contentHeadStreamBuffer
- HeadStreamBuffer
to the linked list ofStreamBuffer
instances containing theHttpResponse
entity. May benull
if no entity content.
-
-