|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.catalina.core.DummyResponse
Dummy response object, used for JSP precompilation.
Field Summary |
Fields inherited from interface javax.servlet.http.HttpServletResponse |
SC_ACCEPTED, SC_BAD_GATEWAY, SC_BAD_REQUEST, SC_CONFLICT, SC_CONTINUE, SC_CREATED, SC_EXPECTATION_FAILED, SC_FORBIDDEN, SC_FOUND, SC_GATEWAY_TIMEOUT, SC_GONE, SC_HTTP_VERSION_NOT_SUPPORTED, SC_INTERNAL_SERVER_ERROR, SC_LENGTH_REQUIRED, SC_METHOD_NOT_ALLOWED, SC_MOVED_PERMANENTLY, SC_MOVED_TEMPORARILY, SC_MULTIPLE_CHOICES, SC_NO_CONTENT, SC_NON_AUTHORITATIVE_INFORMATION, SC_NOT_ACCEPTABLE, SC_NOT_FOUND, SC_NOT_IMPLEMENTED, SC_NOT_MODIFIED, SC_OK, SC_PARTIAL_CONTENT, SC_PAYMENT_REQUIRED, SC_PRECONDITION_FAILED, SC_PROXY_AUTHENTICATION_REQUIRED, SC_REQUEST_ENTITY_TOO_LARGE, SC_REQUEST_TIMEOUT, SC_REQUEST_URI_TOO_LONG, SC_REQUESTED_RANGE_NOT_SATISFIABLE, SC_RESET_CONTENT, SC_SEE_OTHER, SC_SERVICE_UNAVAILABLE, SC_SWITCHING_PROTOCOLS, SC_TEMPORARY_REDIRECT, SC_UNAUTHORIZED, SC_UNSUPPORTED_MEDIA_TYPE, SC_USE_PROXY |
Constructor Summary | |
DummyResponse()
|
Method Summary | |
void |
addCookie(javax.servlet.http.Cookie cookie)
|
void |
addDateHeader(java.lang.String name,
long value)
|
void |
addHeader(java.lang.String name,
java.lang.String value)
|
void |
addIntHeader(java.lang.String name,
int value)
|
boolean |
containsHeader(java.lang.String name)
|
javax.servlet.ServletOutputStream |
createOutputStream()
Create and return a ServletOutputStream to write the content associated with this Response. |
java.lang.String |
encodeRedirectUrl(java.lang.String url)
|
java.lang.String |
encodeRedirectURL(java.lang.String url)
|
java.lang.String |
encodeUrl(java.lang.String url)
|
java.lang.String |
encodeURL(java.lang.String url)
|
void |
finishResponse()
Perform whatever actions are required to flush and close the output stream or writer, in a single operation. |
void |
flushBuffer()
|
int |
getBufferSize()
|
java.lang.String |
getCharacterEncoding()
|
Connector |
getConnector()
Return the Connector through which this Response is returned. |
int |
getContentCount()
Return the number of bytes actually written to the output stream. |
int |
getContentLength()
Return the content length that was set or calculated for this Response. |
java.lang.String |
getContentType()
Return the content type that was set or calculated for this response, or null if no content type was set. |
Context |
getContext()
Return the Context with which this Response is associated. |
javax.servlet.http.Cookie[] |
getCookies()
Return an array of all cookies set for this response, or a zero-length array if no cookies have been set. |
java.lang.String |
getHeader(java.lang.String name)
Return the value for the specified header, or null if this
header has not been set. |
java.lang.String[] |
getHeaderNames()
Return an array of all the header names set for this response, or a zero-length array if no headers have been set. |
java.lang.String[] |
getHeaderValues(java.lang.String name)
Return an array of all the header values associated with the specified header name, or an zero-length array if there are no such header values. |
boolean |
getIncluded()
Return the "processing inside an include" flag. |
java.lang.String |
getInfo()
Return descriptive information about this Response implementation and the corresponding version number, in the format <description>/<version> . |
java.util.Locale |
getLocale()
|
java.lang.String |
getMessage()
Return the error message that was set with sendError()
for this Response. |
javax.servlet.ServletOutputStream |
getOutputStream()
|
java.io.PrintWriter |
getReporter()
Return a PrintWriter that can be used to render error messages, regardless of whether a stream or writer has already been acquired. |
Request |
getRequest()
Return the Request with which this Response is associated. |
javax.servlet.ServletResponse |
getResponse()
Return the ServletResponse for which this object
is the facade. |
int |
getStatus()
Return the HTTP status code associated with this Response. |
java.io.OutputStream |
getStream()
Return the output stream associated with this Response. |
java.io.PrintWriter |
getWriter()
|
boolean |
isAppCommitted()
Application commit flag accessor. |
boolean |
isCommitted()
|
boolean |
isError()
Error flag accessor. |
boolean |
isSuspended()
Suspended flag accessor. |
void |
recycle()
Release all object references, and initialize instance variables, in preparation for reuse of this object. |
void |
reset()
|
void |
reset(int status,
java.lang.String message)
Reset this response, and specify the values for the HTTP status code and corresponding message. |
void |
resetBuffer()
Reset the data buffer but not any status or header information. |
void |
sendAcknowledgement()
Send an acknowledgment of a request. |
void |
sendError(int status)
|
void |
sendError(int status,
java.lang.String message)
|
void |
sendRedirect(java.lang.String location)
|
void |
setAppCommitted(boolean appCommitted)
Set the application commit flag. |
void |
setBufferSize(int size)
|
void |
setCharacterEncoding(java.lang.String charEncoding)
|
void |
setConnector(Connector connector)
Set the Connector through which this Response is returned. |
void |
setContentLength(int length)
|
void |
setContentType(java.lang.String type)
|
void |
setContext(Context context)
Set the Context with which this Response is associated. |
void |
setDateHeader(java.lang.String name,
long value)
|
void |
setError()
Set the error flag. |
void |
setHeader(java.lang.String name,
java.lang.String value)
|
void |
setIncluded(boolean included)
Set the "processing inside an include" flag. |
void |
setIntHeader(java.lang.String name,
int value)
|
void |
setLocale(java.util.Locale locale)
|
void |
setRequest(Request request)
Set the Request with which this Response is associated. |
void |
setStatus(int status)
|
void |
setStatus(int status,
java.lang.String message)
|
void |
setStream(java.io.OutputStream stream)
Set the output stream associated with this Response. |
void |
setSuspended(boolean suspended)
Set the suspended flag. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DummyResponse()
Method Detail |
public void setAppCommitted(boolean appCommitted)
Response
setAppCommitted
in interface Response
appCommitted
- The new application committed flag valuepublic boolean isAppCommitted()
Response
isAppCommitted
in interface Response
public Connector getConnector()
Response
getConnector
in interface Response
public void setConnector(Connector connector)
Response
setConnector
in interface Response
connector
- The new connectorpublic int getContentCount()
Response
getContentCount
in interface Response
public Context getContext()
Response
getContext
in interface Response
public void setContext(Context context)
Response
setContext
in interface Response
context
- The associated Contextpublic boolean getIncluded()
Response
getIncluded
in interface Response
public void setIncluded(boolean included)
Response
setIncluded
in interface Response
included
- true
if we are currently inside a
RequestDispatcher.include(), else false
public java.lang.String getInfo()
Response
<description>/<version>
.
getInfo
in interface Response
public Request getRequest()
Response
getRequest
in interface Response
public void setRequest(Request request)
Response
setRequest
in interface Response
request
- The new associated requestpublic javax.servlet.ServletResponse getResponse()
Response
ServletResponse
for which this object
is the facade.
getResponse
in interface Response
public java.io.OutputStream getStream()
Response
getStream
in interface Response
public void setStream(java.io.OutputStream stream)
Response
setStream
in interface Response
stream
- The new output streampublic void setSuspended(boolean suspended)
Response
setSuspended
in interface Response
suspended
- The new suspended flag valuepublic boolean isSuspended()
Response
isSuspended
in interface Response
public void setError()
Response
setError
in interface Response
public boolean isError()
Response
isError
in interface Response
public javax.servlet.ServletOutputStream createOutputStream() throws java.io.IOException
Response
createOutputStream
in interface Response
java.io.IOException
- if an input/output error occurspublic void finishResponse() throws java.io.IOException
Response
finishResponse
in interface Response
java.io.IOException
- if an input/output error occurspublic int getContentLength()
Response
getContentLength
in interface Response
public java.lang.String getContentType()
Response
null
if no content type was set.
getContentType
in interface Response
public java.io.PrintWriter getReporter()
Response
getReporter
in interface Response
public void recycle()
Response
recycle
in interface Response
public void write(int b) throws java.io.IOException
java.io.IOException
public void write(byte[] b) throws java.io.IOException
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
public void flushBuffer() throws java.io.IOException
flushBuffer
in interface javax.servlet.ServletResponse
java.io.IOException
public int getBufferSize()
getBufferSize
in interface javax.servlet.ServletResponse
public java.lang.String getCharacterEncoding()
getCharacterEncoding
in interface javax.servlet.ServletResponse
public void setCharacterEncoding(java.lang.String charEncoding)
setCharacterEncoding
in interface javax.servlet.ServletResponse
public javax.servlet.ServletOutputStream getOutputStream() throws java.io.IOException
getOutputStream
in interface javax.servlet.ServletResponse
java.io.IOException
public java.util.Locale getLocale()
getLocale
in interface javax.servlet.ServletResponse
public java.io.PrintWriter getWriter() throws java.io.IOException
getWriter
in interface javax.servlet.ServletResponse
java.io.IOException
public boolean isCommitted()
isCommitted
in interface javax.servlet.ServletResponse
public void reset()
reset
in interface javax.servlet.ServletResponse
public void resetBuffer()
Response
resetBuffer
in interface Response
public void setBufferSize(int size)
setBufferSize
in interface javax.servlet.ServletResponse
public void setContentLength(int length)
setContentLength
in interface javax.servlet.ServletResponse
public void setContentType(java.lang.String type)
setContentType
in interface javax.servlet.ServletResponse
public void setLocale(java.util.Locale locale)
setLocale
in interface javax.servlet.ServletResponse
public javax.servlet.http.Cookie[] getCookies()
HttpResponse
getCookies
in interface HttpResponse
public java.lang.String getHeader(java.lang.String name)
HttpResponse
null
if this
header has not been set. If more than one value was added for this
name, only the first is returned; use getHeaderValues() to retrieve all
of them.
getHeader
in interface HttpResponse
name
- Header name to look uppublic java.lang.String[] getHeaderNames()
HttpResponse
getHeaderNames
in interface HttpResponse
public java.lang.String[] getHeaderValues(java.lang.String name)
HttpResponse
getHeaderValues
in interface HttpResponse
name
- Header name to look uppublic java.lang.String getMessage()
HttpResponse
sendError()
for this Response.
getMessage
in interface HttpResponse
public int getStatus()
HttpResponse
getStatus
in interface HttpResponse
public void reset(int status, java.lang.String message)
HttpResponse
reset
in interface HttpResponse
public void addCookie(javax.servlet.http.Cookie cookie)
addCookie
in interface javax.servlet.http.HttpServletResponse
public void addDateHeader(java.lang.String name, long value)
addDateHeader
in interface javax.servlet.http.HttpServletResponse
public void addHeader(java.lang.String name, java.lang.String value)
addHeader
in interface javax.servlet.http.HttpServletResponse
public void addIntHeader(java.lang.String name, int value)
addIntHeader
in interface javax.servlet.http.HttpServletResponse
public boolean containsHeader(java.lang.String name)
containsHeader
in interface javax.servlet.http.HttpServletResponse
public java.lang.String encodeRedirectURL(java.lang.String url)
encodeRedirectURL
in interface javax.servlet.http.HttpServletResponse
public java.lang.String encodeRedirectUrl(java.lang.String url)
encodeRedirectUrl
in interface javax.servlet.http.HttpServletResponse
public java.lang.String encodeURL(java.lang.String url)
encodeURL
in interface javax.servlet.http.HttpServletResponse
public java.lang.String encodeUrl(java.lang.String url)
encodeUrl
in interface javax.servlet.http.HttpServletResponse
public void sendAcknowledgement() throws java.io.IOException
Response
sendAcknowledgement
in interface Response
java.io.IOException
- if an input/output error occurspublic void sendError(int status) throws java.io.IOException
sendError
in interface javax.servlet.http.HttpServletResponse
java.io.IOException
public void sendError(int status, java.lang.String message) throws java.io.IOException
sendError
in interface javax.servlet.http.HttpServletResponse
java.io.IOException
public void sendRedirect(java.lang.String location) throws java.io.IOException
sendRedirect
in interface javax.servlet.http.HttpServletResponse
java.io.IOException
public void setDateHeader(java.lang.String name, long value)
setDateHeader
in interface javax.servlet.http.HttpServletResponse
public void setHeader(java.lang.String name, java.lang.String value)
setHeader
in interface javax.servlet.http.HttpServletResponse
public void setIntHeader(java.lang.String name, int value)
setIntHeader
in interface javax.servlet.http.HttpServletResponse
public void setStatus(int status)
setStatus
in interface javax.servlet.http.HttpServletResponse
public void setStatus(int status, java.lang.String message)
setStatus
in interface javax.servlet.http.HttpServletResponse
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |