|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.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.Responsepublic 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.Responsepublic void addCookie(org.apache.cocoon.environment.Cookie cookie)
addCookie in interface org.apache.cocoon.environment.Responsepublic boolean containsHeader(String name)
containsHeader in interface org.apache.cocoon.environment.Responsepublic String encodeURL(String url)
encodeURL in interface org.apache.cocoon.environment.Responsepublic String encodeRedirectURL(String url)
encodeRedirectURL in interface HttpServletResponseencodeRedirectURL in class AbstractResponse
public void sendError(int sc,
String msg)
throws IOException
sendError in interface HttpServletResponsesendError in class AbstractResponseIOException
public void sendError(int sc)
throws IOException
sendError in interface HttpServletResponsesendError in class AbstractResponseIOException
public void sendRedirect(String location)
throws IOException
sendRedirect in interface HttpServletResponsesendRedirect in class AbstractResponseIOException
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.Responsepublic void setStatus(int sc)
setStatus in interface HttpServletResponsesetStatus in class AbstractResponsepublic String encodeUrl(String url)
encodeUrl in interface HttpServletResponseencodeUrl in class AbstractResponsepublic String encodeRedirectUrl(String url)
encodeRedirectUrl in interface HttpServletResponseencodeRedirectUrl 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 HttpServletResponsesetStatus in class AbstractResponsepublic String getCharacterEncoding()
getCharacterEncoding in interface org.apache.cocoon.environment.Response
public ServletOutputStream getOutputStream()
throws IOException
getOutputStream in interface ServletResponsegetOutputStream in class AbstractResponseIOException
public PrintWriter getWriter()
throws IOException
getWriter in interface ServletResponsegetWriter in class AbstractResponseIOExceptionpublic void setContentLength(int len)
setContentLength in interface ServletResponsesetContentLength in class AbstractResponsepublic void setContentType(String type)
setContentType in interface ServletResponsesetContentType in class AbstractResponsepublic void setBufferSize(int size)
setBufferSize in interface ServletResponsesetBufferSize in class AbstractResponsepublic int getBufferSize()
getBufferSize in interface ServletResponsegetBufferSize in class AbstractResponse
public void flushBuffer()
throws IOException
flushBuffer in interface ServletResponseflushBuffer in class AbstractResponseIOExceptionpublic boolean isCommitted()
isCommitted in interface ServletResponseisCommitted in class AbstractResponsepublic void reset()
reset in interface ServletResponsereset in class AbstractResponsepublic void setLocale(Locale loc)
setLocale in interface org.apache.cocoon.environment.Responsepublic 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 | ||||||||||