Class GoogleFunctionHttpResponseWriter
java.lang.Object
net.officefloor.server.google.function.GoogleFunctionHttpResponseWriter
- All Implemented Interfaces:
HttpResponseWriter<ByteBuffer>
public class GoogleFunctionHttpResponseWriter
extends Object
implements HttpResponseWriter<ByteBuffer>
Google Function
HttpResponseWriter.-
Constructor Summary
ConstructorsConstructorDescriptionGoogleFunctionHttpResponseWriter(com.google.cloud.functions.HttpResponse response, StreamBufferPool<ByteBuffer> bufferPool) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionObtains the write failure.voidwriteHttpResponse(HttpVersion version, HttpStatus status, WritableHttpHeader headHttpHeader, WritableHttpCookie headHttpCookie, long contentLength, HttpHeaderValue contentType, StreamBuffer<ByteBuffer> contentHeadStreamBuffer) Writes theHttpResponse.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.officefloor.server.http.HttpResponseWriter
writeHttpExternalResponse
-
Constructor Details
-
GoogleFunctionHttpResponseWriter
public GoogleFunctionHttpResponseWriter(com.google.cloud.functions.HttpResponse response, StreamBufferPool<ByteBuffer> bufferPool) Instantiate.- Parameters:
response-HttpResponse.bufferPool-StreamBufferPool.
-
-
Method Details
-
getWriteFailure
Obtains the write failure.- Returns:
IOExceptionfor write failure ornullif no failure.
-
writeHttpResponse
public void writeHttpResponse(HttpVersion version, HttpStatus status, WritableHttpHeader headHttpHeader, WritableHttpCookie headHttpCookie, long contentLength, HttpHeaderValue contentType, StreamBuffer<ByteBuffer> contentHeadStreamBuffer) Description copied from interface:HttpResponseWriterWrites theHttpResponse.- Specified by:
writeHttpResponsein interfaceHttpResponseWriter<ByteBuffer>- Parameters:
version-HttpVersion.status-HttpStatus.headHttpHeader- HeadWritableHttpHeaderto the linked list ofWritableHttpHeaderinstances for theHttpResponse.headHttpCookie- HeadWritableHttpCookieto the linked list ofWritableHttpCookieinstances for theHttpResponse.contentLength- Number of bytes in the HTTP entity.contentType-Content-Typeof the HTTP entity.contentHeadStreamBuffer- HeadStreamBufferto the linked list ofStreamBufferinstances containing theHttpResponseentity. May benullif no entity content.
-