Class HttpServletResponseWrapper
- java.lang.Object
-
- org.jboss.resteasy.plugins.server.servlet.HttpServletResponseWrapper
-
- All Implemented Interfaces:
HttpResponse
public class HttpServletResponseWrapper extends java.lang.Object implements HttpResponse
- Version:
- $Revision: 1 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
HttpServletResponseWrapper.DeferredOutputStream
RESTEASY-684 wants to defer access to outputstream until a write/flush/close happens
-
Field Summary
Fields Modifier and Type Field Description protected ResteasyProviderFactory
factory
protected javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object>
outputHeaders
protected java.io.OutputStream
outputStream
protected javax.servlet.http.HttpServletResponse
response
protected int
status
-
Constructor Summary
Constructors Constructor Description HttpServletResponseWrapper(javax.servlet.http.HttpServletResponse response, ResteasyProviderFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addNewCookie(javax.ws.rs.core.NewCookie cookie)
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object>
getOutputHeaders()
java.io.OutputStream
getOutputStream()
int
getStatus()
boolean
isCommitted()
void
reset()
reset status and headers.void
sendError(int status)
void
sendError(int status, java.lang.String message)
void
setOutputStream(java.io.OutputStream os)
void
setStatus(int status)
-
-
-
Field Detail
-
response
protected javax.servlet.http.HttpServletResponse response
-
status
protected int status
-
outputHeaders
protected javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.Object> outputHeaders
-
factory
protected ResteasyProviderFactory factory
-
outputStream
protected java.io.OutputStream outputStream
-
-
Constructor Detail
-
HttpServletResponseWrapper
public HttpServletResponseWrapper(javax.servlet.http.HttpServletResponse response, ResteasyProviderFactory factory)
-
-
Method Detail
-
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<java.lang.String,java.lang.Object> getOutputHeaders()
- Specified by:
getOutputHeaders
in interfaceHttpResponse
-
getOutputStream
public java.io.OutputStream getOutputStream() throws java.io.IOException
- Specified by:
getOutputStream
in interfaceHttpResponse
- Throws:
java.io.IOException
-
setOutputStream
public void setOutputStream(java.io.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 java.io.IOException
- Specified by:
sendError
in interfaceHttpResponse
- Throws:
java.io.IOException
-
sendError
public void sendError(int status, java.lang.String message) throws java.io.IOException
- Specified by:
sendError
in interfaceHttpResponse
- Throws:
java.io.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
-
-