Class HttpServletHttpResponseWriter
java.lang.Object
net.officefloor.server.http.servlet.HttpServletHttpResponseWriter
- All Implemented Interfaces:
HttpResponseWriter<ByteBuffer>
HttpServlet HttpResponseWriter.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionHttpServletHttpResponseWriter(jakarta.servlet.http.HttpServletResponse response, StreamBufferPool<ByteBuffer> bufferPool) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates if serviced.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
-
HttpServletHttpResponseWriter
public HttpServletHttpResponseWriter(jakarta.servlet.http.HttpServletResponse response, StreamBufferPool<ByteBuffer> bufferPool) Instantiate.- Parameters:
response-HttpServletResponse.bufferPool-StreamBufferPool.
-
-
Method Details
-
isServiced
Indicates if serviced.- Returns:
trueif serviced.- Throws:
IOException- If fails to write response.
-
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.
-