Class HttpServletHttpResponseWriter
- java.lang.Object
-
- net.officefloor.server.http.servlet.HttpServletHttpResponseWriter
-
- All Implemented Interfaces:
HttpResponseWriter<java.nio.ByteBuffer>
public class HttpServletHttpResponseWriter extends java.lang.Object implements HttpResponseWriter<java.nio.ByteBuffer>
HttpServlet
HttpResponseWriter
.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description HttpServletHttpResponseWriter(javax.servlet.http.HttpServletResponse response, StreamBufferPool<java.nio.ByteBuffer> bufferPool)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isServiced()
Indicates if serviced.void
writeHttpResponse(HttpVersion version, HttpStatus status, WritableHttpHeader headHttpHeader, WritableHttpCookie headHttpCookie, long contentLength, HttpHeaderValue contentType, StreamBuffer<java.nio.ByteBuffer> contentHeadStreamBuffer)
Writes theHttpResponse
.
-
-
-
Constructor Detail
-
HttpServletHttpResponseWriter
public HttpServletHttpResponseWriter(javax.servlet.http.HttpServletResponse response, StreamBufferPool<java.nio.ByteBuffer> bufferPool)
Instantiate.- Parameters:
response
-HttpServletResponse
.bufferPool
-StreamBufferPool
.
-
-
Method Detail
-
isServiced
public boolean isServiced() throws java.io.IOException
Indicates if serviced.- Returns:
true
if serviced.- Throws:
java.io.IOException
- If fails to write 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.
-
-