Class HttpServletResponseWrapper
- java.lang.Object
-
- org.jboss.resteasy.plugins.server.servlet.HttpServletResponseWrapper
-
- All Implemented Interfaces:
Closeable,AutoCloseable,HttpResponse
public class HttpServletResponseWrapper extends Object implements HttpResponse
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classHttpServletResponseWrapper.AsyncOperationprotected classHttpServletResponseWrapper.DeferredOutputStreamRESTEASY-684 wants to defer access to outputstream until a write happensclassHttpServletResponseWrapper.FlushOperationclassHttpServletResponseWrapper.WriteOperation
-
Field Summary
Fields Modifier and Type Field Description protected Map<Class<?>,Object>contextDataMapprotected ResteasyProviderFactoryfactoryprotected javax.ws.rs.core.MultivaluedMap<String,Object>outputHeadersprotected OutputStreamoutputStreamprotected javax.servlet.http.HttpServletRequestrequestprotected javax.servlet.http.HttpServletResponseresponseprotected intstatusprotected booleansuppressExceptionDuringChunkedTransfer
-
Constructor Summary
Constructors Constructor Description HttpServletResponseWrapper(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, ResteasyProviderFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddNewCookie(javax.ws.rs.core.NewCookie cookie)voidflushBuffer()javax.ws.rs.core.MultivaluedMap<String,Object>getOutputHeaders()OutputStreamgetOutputStream()intgetStatus()booleanisCommitted()voidreset()reset status and headers.voidsendError(int status)voidsendError(int status, String message)voidsetOutputStream(OutputStream os)voidsetStatus(int status)voidsetSuppressExceptionDuringChunkedTransfer(boolean suppressExceptionDuringChunkedTransfer)booleansuppressExceptionDuringChunkedTransfer()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.resteasy.spi.HttpResponse
close, getAsyncOutputStream
-
-
-
-
Field Detail
-
response
protected javax.servlet.http.HttpServletResponse response
-
status
protected int status
-
factory
protected ResteasyProviderFactory factory
-
outputStream
protected OutputStream outputStream
-
suppressExceptionDuringChunkedTransfer
protected volatile boolean suppressExceptionDuringChunkedTransfer
-
request
protected javax.servlet.http.HttpServletRequest request
-
-
Constructor Detail
-
HttpServletResponseWrapper
public HttpServletResponseWrapper(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, ResteasyProviderFactory factory)
-
-
Method Detail
-
setSuppressExceptionDuringChunkedTransfer
public void setSuppressExceptionDuringChunkedTransfer(boolean suppressExceptionDuringChunkedTransfer)
- Specified by:
setSuppressExceptionDuringChunkedTransferin interfaceHttpResponse
-
suppressExceptionDuringChunkedTransfer
public boolean suppressExceptionDuringChunkedTransfer()
- Specified by:
suppressExceptionDuringChunkedTransferin interfaceHttpResponse
-
getStatus
public int getStatus()
- Specified by:
getStatusin interfaceHttpResponse
-
setStatus
public void setStatus(int status)
- Specified by:
setStatusin interfaceHttpResponse
-
getOutputHeaders
public javax.ws.rs.core.MultivaluedMap<String,Object> getOutputHeaders()
- Specified by:
getOutputHeadersin interfaceHttpResponse
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStreamin interfaceHttpResponse- Throws:
IOException
-
setOutputStream
public void setOutputStream(OutputStream os)
- Specified by:
setOutputStreamin interfaceHttpResponse
-
addNewCookie
public void addNewCookie(javax.ws.rs.core.NewCookie cookie)
- Specified by:
addNewCookiein interfaceHttpResponse
-
sendError
public void sendError(int status) throws IOException- Specified by:
sendErrorin interfaceHttpResponse- Throws:
IOException
-
sendError
public void sendError(int status, String message) throws IOException- Specified by:
sendErrorin interfaceHttpResponse- Throws:
IOException
-
isCommitted
public boolean isCommitted()
- Specified by:
isCommittedin interfaceHttpResponse
-
reset
public void reset()
Description copied from interface:HttpResponsereset status and headers. Will fail if response is committed- Specified by:
resetin interfaceHttpResponse
-
flushBuffer
public void flushBuffer() throws IOException- Specified by:
flushBufferin interfaceHttpResponse- Throws:
IOException
-
-