|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.environment.impl.AbstractResponse org.apache.cocoon.environment.http.HttpResponse
Implements the Response
interface
to provide response functionality in the HTTP servlets environment.
Field Summary |
Constructor Summary | |
protected |
HttpResponse(HttpServletResponse res)
Creates a HttpServletResponse based on a real HttpServletResponse object |
Method Summary | |
void |
addCookie(Cookie cookie)
|
void |
addCookie(org.apache.cocoon.environment.Cookie cookie)
|
void |
addDateHeader(String name,
long date)
|
void |
addHeader(String name,
String value)
|
void |
addIntHeader(String name,
int value)
|
boolean |
containsHeader(String name)
|
org.apache.cocoon.environment.Cookie |
createCocoonCookie(String name,
String value)
|
Cookie |
createCookie(String name,
String value)
Create a new cookie which is not added to the response |
String |
encodeRedirectUrl(String url)
Deprecated. As of version 2.1, use encodeRedirectURL(String url) instead |
String |
encodeRedirectURL(String url)
|
String |
encodeUrl(String url)
Deprecated. As of version 2.1, use encodeURL(String url) instead |
String |
encodeURL(String url)
|
void |
flushBuffer()
|
int |
getBufferSize()
|
String |
getCharacterEncoding()
|
Locale |
getLocale()
|
ServletOutputStream |
getOutputStream()
|
PrintWriter |
getWriter()
|
boolean |
isCommitted()
|
void |
reset()
|
void |
sendError(int sc)
|
void |
sendError(int sc,
String msg)
|
void |
sendPermanentRedirect(String location)
|
void |
sendRedirect(String location)
|
void |
setBufferSize(int size)
|
void |
setContentLength(int len)
|
void |
setContentType(String type)
|
void |
setDateHeader(String name,
long date)
|
void |
setHeader(String name,
String value)
|
void |
setIntHeader(String name,
int value)
|
void |
setLocale(Locale loc)
|
void |
setStatus(int sc)
|
void |
setStatus(int sc,
String sm)
Deprecated. As of version 2.1, due to ambiguous meaning of the message parameter. To set a status code use setStatus(int) , to send an error with a description
use sendError(int, String) . |
Methods inherited from class org.apache.cocoon.environment.impl.AbstractResponse |
getContentType, resetBuffer, setCharacterEncoding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.servlet.ServletResponse |
getContentType, resetBuffer, setCharacterEncoding |
Constructor Detail |
protected HttpResponse(HttpServletResponse res)
Method Detail |
public Cookie createCookie(String name, String value)
createCookie
in interface org.apache.cocoon.environment.Response
public void addCookie(Cookie cookie)
addCookie
in interface org.apache.cocoon.environment.Response
public org.apache.cocoon.environment.Cookie createCocoonCookie(String name, String value)
createCocoonCookie
in interface org.apache.cocoon.environment.Response
public void addCookie(org.apache.cocoon.environment.Cookie cookie)
addCookie
in interface org.apache.cocoon.environment.Response
public boolean containsHeader(String name)
containsHeader
in interface org.apache.cocoon.environment.Response
public String encodeURL(String url)
encodeURL
in interface org.apache.cocoon.environment.Response
public String encodeRedirectURL(String url)
encodeRedirectURL
in interface HttpServletResponse
encodeRedirectURL
in class AbstractResponse
public void sendError(int sc, String msg) throws IOException
sendError
in interface HttpServletResponse
sendError
in class AbstractResponse
IOException
public void sendError(int sc) throws IOException
sendError
in interface HttpServletResponse
sendError
in class AbstractResponse
IOException
public void sendRedirect(String location) throws IOException
sendRedirect
in interface HttpServletResponse
sendRedirect
in class AbstractResponse
IOException
public void sendPermanentRedirect(String location) throws IOException
IOException
public void setDateHeader(String name, long date)
setDateHeader
in interface org.apache.cocoon.environment.Response
public void addDateHeader(String name, long date)
addDateHeader
in interface org.apache.cocoon.environment.Response
public void setHeader(String name, String value)
setHeader
in interface org.apache.cocoon.environment.Response
public void addHeader(String name, String value)
addHeader
in interface org.apache.cocoon.environment.Response
public void setIntHeader(String name, int value)
setIntHeader
in interface org.apache.cocoon.environment.Response
public void addIntHeader(String name, int value)
addIntHeader
in interface org.apache.cocoon.environment.Response
public void setStatus(int sc)
setStatus
in interface HttpServletResponse
setStatus
in class AbstractResponse
public String encodeUrl(String url)
encodeUrl
in interface HttpServletResponse
encodeUrl
in class AbstractResponse
public String encodeRedirectUrl(String url)
encodeRedirectUrl
in interface HttpServletResponse
encodeRedirectUrl
in class AbstractResponse
public void setStatus(int sc, String sm)
setStatus(int)
, to send an error with a description
use sendError(int, String)
.
setStatus
in interface HttpServletResponse
setStatus
in class AbstractResponse
public String getCharacterEncoding()
getCharacterEncoding
in interface org.apache.cocoon.environment.Response
public ServletOutputStream getOutputStream() throws IOException
getOutputStream
in interface ServletResponse
getOutputStream
in class AbstractResponse
IOException
public PrintWriter getWriter() throws IOException
getWriter
in interface ServletResponse
getWriter
in class AbstractResponse
IOException
public void setContentLength(int len)
setContentLength
in interface ServletResponse
setContentLength
in class AbstractResponse
public void setContentType(String type)
setContentType
in interface ServletResponse
setContentType
in class AbstractResponse
public void setBufferSize(int size)
setBufferSize
in interface ServletResponse
setBufferSize
in class AbstractResponse
public int getBufferSize()
getBufferSize
in interface ServletResponse
getBufferSize
in class AbstractResponse
public void flushBuffer() throws IOException
flushBuffer
in interface ServletResponse
flushBuffer
in class AbstractResponse
IOException
public boolean isCommitted()
isCommitted
in interface ServletResponse
isCommitted
in class AbstractResponse
public void reset()
reset
in interface ServletResponse
reset
in class AbstractResponse
public void setLocale(Locale loc)
setLocale
in interface org.apache.cocoon.environment.Response
public Locale getLocale()
getLocale
in interface org.apache.cocoon.environment.Response
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |