|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.server.connection.AbstractHttpResponse
com.caucho.server.connection.StubServletResponse
public class StubServletResponse
| Field Summary |
|---|
| Fields inherited from class com.caucho.server.connection.AbstractHttpResponse |
|---|
_calendar, _cb, _charEncoding, _contentLength, _contentPrefix, _contentType, _cookiesOut, _disableCaching, _disableHeaders, _footerKeys, _footerValues, _forbidForward, _hasCharEncoding, _hasError, _hasOutputStream, _hasSentLog, _hasWriter, _headerBuffer, _headerCodes, _headerKeys, _headerValues, _isClosed, _isNoCache, _isTopCache, _originalRequest, _rawWrite, _request, _statusCode, _statusMessage, HEADER_CACHE_CONTROL, HEADER_CONNECTION, HEADER_CONTENT_LENGTH, HEADER_CONTENT_TYPE, HEADER_DATE, HEADER_SERVER, log |
| Constructor Summary | |
|---|---|
StubServletResponse()
|
|
| Method Summary | |
|---|---|
void |
addCookie(Cookie cookie)
Adds a cookie to the response. |
void |
addDateHeader(java.lang.String header,
long value)
Convenience for adding a date header. |
void |
addHeader(java.lang.String header,
java.lang.String value)
Adds a new header. |
void |
addIntHeader(java.lang.String header,
int value)
Convenience for adding an integer header. |
void |
clearBuffer()
|
void |
close()
Closes the request. |
boolean |
containsHeader(java.lang.String header)
Returns true if the response already contains the named header. |
boolean |
disableHeaders(boolean disable)
|
java.lang.String |
encodeRedirectUrl(java.lang.String url)
|
java.lang.String |
encodeRedirectURL(java.lang.String url)
Encodes session information in a URL suitable for sendRedirect() |
java.lang.String |
encodeUrl(java.lang.String url)
|
java.lang.String |
encodeURL(java.lang.String url)
Encode the URL with the session jd. |
void |
flushBuffer()
Flushes the buffer to the client. |
int |
getBufferSize()
Returns the size of the output buffer. |
java.lang.String |
getCharacterEncoding()
Gets the character encoding. |
boolean |
getForbidForward()
Returns true if RequestDispatcher.forward() is disallowed on this stream. |
java.lang.String |
getHeader(java.lang.String key)
Returns the value of an already set output header. |
java.util.Locale |
getLocale()
Returns the output locale. |
int |
getRemaining()
|
boolean |
hasError()
Returns true if we're processing an error. |
boolean |
isCommitted()
Returns true if some data has been sent to the browser. |
void |
killCache()
Set if the page is non-cacheable. |
void |
reset()
Resets the output stream, clearing headers and the output buffer. |
void |
resetBuffer()
Resets the output stream, clearing headers and the output buffer. |
void |
sendError(int i)
Sends an HTTP error page based on the status code |
void |
sendError(int i,
java.lang.String message)
Sends an HTTP error to the browser. |
void |
sendRedirect(java.lang.String location)
Sends a redirect to the browser. |
void |
setBufferSize(int size)
Sets the output buffer size to size. |
void |
setContentLength(int length)
Sets the content length of the result. |
void |
setContentType(java.lang.String type)
Sets the browser content type. |
void |
setDateHeader(java.lang.String header,
long value)
Convenience for setting a date header. |
void |
setForbidForward(boolean forbid)
When set to true, RequestDispatcher.forward() is disallowed on this stream. |
void |
setHasError(boolean hasError)
Set to true while processing an error. |
void |
setHeader(java.lang.String header,
java.lang.String value)
Sets a header, replacing an already-existing header. |
void |
setIntHeader(java.lang.String header,
int value)
Convenience for setting an integer header. |
void |
setLocale(java.util.Locale locale)
Sets the output locale. |
void |
setPrivateCache(boolean isPrivate)
Sets true if the cache is only for the browser, but not Resin's cache or proxies. |
void |
setSessionId(java.lang.String id)
|
void |
setStatus(int status)
Sets the HTTP status |
void |
setStatus(int status,
java.lang.String messages)
|
boolean |
writeHeadersInt(WriteStream out,
int length,
boolean isHead)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StubServletResponse()
| Method Detail |
|---|
public java.lang.String getCharacterEncoding()
AbstractHttpResponse
getCharacterEncoding in interface ServletResponsegetCharacterEncoding in class AbstractHttpResponsepublic void setLocale(java.util.Locale locale)
ServletResponse
setLocale in interface ServletResponsesetLocale in class AbstractHttpResponsepublic java.util.Locale getLocale()
ServletResponse
getLocale in interface ServletResponsegetLocale in class AbstractHttpResponse
public boolean writeHeadersInt(WriteStream out,
int length,
boolean isHead)
writeHeadersInt in class AbstractHttpResponsepublic void setBufferSize(int size)
ServletResponsesize. The servlet engine
may round the size up.
setBufferSize in interface ServletResponsesetBufferSize in class AbstractHttpResponsesize - the new output buffer size.public int getBufferSize()
ServletResponse
getBufferSize in interface ServletResponsegetBufferSize in class AbstractHttpResponsepublic void flushBuffer()
ServletResponse
flushBuffer in interface ServletResponseflushBuffer in class AbstractHttpResponsepublic boolean isCommitted()
AbstractHttpResponse
isCommitted in interface ServletResponseisCommitted in class AbstractHttpResponsepublic void reset()
ServletResponsereset() after data has been committed is illegal.
reset in interface ServletResponsereset in class AbstractHttpResponsepublic void resetBuffer()
ServletResponsereset() after data has been committed is illegal.
resetBuffer in interface ServletResponseresetBuffer in class AbstractHttpResponsepublic void setContentLength(int length)
AbstractHttpResponse
setContentLength in interface ServletResponsesetContentLength in class AbstractHttpResponselength - the length of the content.public void setContentType(java.lang.String type)
AbstractHttpResponseFor example, to set the output encoding to use UTF-8 instead of
the default ISO-8859-1 (Latin-1), use the following:
setContentType("text/html; charset=UTF-8");
setContentType in interface ServletResponsesetContentType in class AbstractHttpResponsetype - the mime type of the outputpublic void setStatus(int status)
HttpServletResponse
setStatus in interface HttpServletResponsesetStatus in class AbstractHttpResponsestatus - the HTTP status code
public void setStatus(int status,
java.lang.String messages)
setStatus in interface HttpServletResponsesetStatus in class AbstractHttpResponsepublic void sendRedirect(java.lang.String location)
AbstractHttpResponse
sendRedirect in interface HttpServletResponsesendRedirect in class AbstractHttpResponselocation - the possibly relative url to send to the browserpublic void sendError(int i)
HttpServletResponse
sendError in interface HttpServletResponsesendError in class AbstractHttpResponsei - the HTTP status code
public void sendError(int i,
java.lang.String message)
AbstractHttpResponse
sendError in interface HttpServletResponsesendError in class AbstractHttpResponsei - the HTTP error codemessage - a string messagepublic java.lang.String encodeUrl(java.lang.String url)
encodeUrl in interface HttpServletResponseencodeUrl in class AbstractHttpResponsepublic java.lang.String encodeURL(java.lang.String url)
AbstractHttpResponse
encodeURL in interface HttpServletResponseencodeURL in class AbstractHttpResponseurl - the url to be encoded
public java.lang.String encodeRedirectUrl(java.lang.String url)
encodeRedirectUrl in interface HttpServletResponseencodeRedirectUrl in class AbstractHttpResponsepublic java.lang.String encodeRedirectURL(java.lang.String url)
HttpServletResponsesendRedirect()
encodeRedirectURL in interface HttpServletResponseencodeRedirectURL in class AbstractHttpResponsepublic void addCookie(Cookie cookie)
AbstractHttpResponse
addCookie in interface HttpServletResponseaddCookie in class AbstractHttpResponsecookie - the response cookiepublic boolean containsHeader(java.lang.String header)
AbstractHttpResponse
containsHeader in interface HttpServletResponsecontainsHeader in class AbstractHttpResponseheader - name of the header to test.
public void setHeader(java.lang.String header,
java.lang.String value)
AbstractHttpResponse
setHeader in interface HttpServletResponsesetHeader in class AbstractHttpResponseheader - the header key to set.value - the header value to set.
public void setIntHeader(java.lang.String header,
int value)
AbstractHttpResponse
setIntHeader in interface HttpServletResponsesetIntHeader in class AbstractHttpResponseheader - the header name.value - an integer to be converted to a string for the header.
public void setDateHeader(java.lang.String header,
long value)
AbstractHttpResponse
setDateHeader in interface HttpServletResponsesetDateHeader in class AbstractHttpResponseheader - the header name.value - an time in milliseconds to be converted to a date string.
public void addHeader(java.lang.String header,
java.lang.String value)
AbstractHttpResponse
addHeader in interface HttpServletResponseaddHeader in class AbstractHttpResponseheader - the header key.value - the header value.
public void addIntHeader(java.lang.String header,
int value)
AbstractHttpResponse
addIntHeader in interface HttpServletResponseaddIntHeader in class AbstractHttpResponseheader - the header name.value - an integer to be converted to a string for the header.
public void addDateHeader(java.lang.String header,
long value)
AbstractHttpResponse
addDateHeader in interface HttpServletResponseaddDateHeader in class AbstractHttpResponseheader - the header name.value - an time in milliseconds to be converted to a date string.public java.lang.String getHeader(java.lang.String key)
AbstractHttpResponse
getHeader in interface CauchoResponsegetHeader in class AbstractHttpResponsekey - name of the header to get.public void clearBuffer()
clearBuffer in class AbstractHttpResponse
public void close()
throws java.io.IOException
AbstractHttpResponse
close in interface CauchoResponseclose in class AbstractHttpResponsejava.io.IOExceptionpublic boolean disableHeaders(boolean disable)
disableHeaders in interface CauchoResponsedisableHeaders in class AbstractHttpResponsepublic int getRemaining()
getRemaining in class AbstractHttpResponsepublic void setForbidForward(boolean forbid)
AbstractHttpResponse
setForbidForward in interface CauchoResponsesetForbidForward in class AbstractHttpResponsepublic boolean getForbidForward()
AbstractHttpResponse
getForbidForward in interface CauchoResponsegetForbidForward in class AbstractHttpResponsepublic void setHasError(boolean hasError)
AbstractHttpResponse
setHasError in interface CauchoResponsesetHasError in class AbstractHttpResponsepublic boolean hasError()
AbstractHttpResponse
hasError in interface CauchoResponsehasError in class AbstractHttpResponsepublic void killCache()
AbstractHttpResponse
killCache in interface CauchoResponsekillCache in class AbstractHttpResponsepublic void setPrivateCache(boolean isPrivate)
AbstractHttpResponseSince proxy caching also caches headers, cached pages with session ids can't be cached in the browser. XXX: but doesn't this just mean that Resin shouldn't send the session information back if the page is cached? Because a second request where everything is identical would see the same response except for the cookies.
setPrivateCache in interface CauchoResponsesetPrivateCache in class AbstractHttpResponsepublic void setSessionId(java.lang.String id)
setSessionId in interface CauchoResponsesetSessionId in class AbstractHttpResponse
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||