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 class
HttpServletResponseWrapper.AsyncOperation
protected class
HttpServletResponseWrapper.DeferredOutputStream
RESTEASY-684 wants to defer access to outputstream until a write happensclass
HttpServletResponseWrapper.FlushOperation
class
HttpServletResponseWrapper.WriteOperation
-
Field Summary
Fields Modifier and Type Field Description protected Map<Class<?>,Object>
contextDataMap
protected ResteasyProviderFactory
factory
protected javax.ws.rs.core.MultivaluedMap<String,Object>
outputHeaders
protected javax.servlet.http.HttpServletRequest
request
protected javax.servlet.http.HttpServletResponse
response
protected int
status
protected boolean
suppressExceptionDuringChunkedTransfer
-
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 void
addNewCookie(javax.ws.rs.core.NewCookie cookie)
void
flushBuffer()
javax.ws.rs.core.MultivaluedMap<String,Object>
getOutputHeaders()
OutputStream
getOutputStream()
int
getStatus()
boolean
isCommitted()
void
reset()
reset status and headers.void
sendError(int status)
void
sendError(int status, String message)
void
setOutputStream(OutputStream os)
void
setStatus(int status)
void
setSuppressExceptionDuringChunkedTransfer(boolean suppressExceptionDuringChunkedTransfer)
boolean
suppressExceptionDuringChunkedTransfer()
-
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 final javax.servlet.http.HttpServletResponse response
-
status
protected int status
-
factory
protected final ResteasyProviderFactory factory
-
suppressExceptionDuringChunkedTransfer
protected volatile boolean suppressExceptionDuringChunkedTransfer
-
request
protected final 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:
setSuppressExceptionDuringChunkedTransfer
in interfaceHttpResponse
-
suppressExceptionDuringChunkedTransfer
public boolean suppressExceptionDuringChunkedTransfer()
- Specified by:
suppressExceptionDuringChunkedTransfer
in interfaceHttpResponse
-
getStatus
public int getStatus()
- Specified by:
getStatus
in interfaceHttpResponse
-
setStatus
public void setStatus(int status)
- Specified by:
setStatus
in interfaceHttpResponse
-
getOutputHeaders
public javax.ws.rs.core.MultivaluedMap<String,Object> getOutputHeaders()
- Specified by:
getOutputHeaders
in interfaceHttpResponse
-
getOutputStream
public OutputStream getOutputStream() throws IOException
- Specified by:
getOutputStream
in interfaceHttpResponse
- Throws:
IOException
-
setOutputStream
public void setOutputStream(OutputStream os)
- Specified by:
setOutputStream
in interfaceHttpResponse
-
addNewCookie
public void addNewCookie(javax.ws.rs.core.NewCookie cookie)
- Specified by:
addNewCookie
in interfaceHttpResponse
-
sendError
public void sendError(int status) throws IOException
- Specified by:
sendError
in interfaceHttpResponse
- Throws:
IOException
-
sendError
public void sendError(int status, String message) throws IOException
- Specified by:
sendError
in interfaceHttpResponse
- Throws:
IOException
-
isCommitted
public boolean isCommitted()
- Specified by:
isCommitted
in interfaceHttpResponse
-
reset
public void reset()
Description copied from interface:HttpResponse
reset status and headers. Will fail if response is committed- Specified by:
reset
in interfaceHttpResponse
-
flushBuffer
public void flushBuffer() throws IOException
- Specified by:
flushBuffer
in interfaceHttpResponse
- Throws:
IOException
-
-