All Packages Class Hierarchy This Package Previous Next Index
Interface org.apache.tomcat.core.Response
- public interface Response
- Author:
- James Duncan Davidson [duncan@eng.sun.com], Jason Hunter [jch@eng.sun.com], James Todd [gonzo@eng.sun.com], Harish Prabandham, Hans Bergsten , costin@dnt.ro
-
addCookie(Cookie)
-
-
addHeader(String, String)
-
-
containsHeader(String)
-
-
endHeaders()
- Signal that we're done with the headers, and body will follow.
-
finish()
- Signal that we're done with a particular request, the
server can go on and read more requests or close the socket
-
flushBuffer()
- Any implementation needs to notify ContextManger
-
getBufferSize()
-
-
getCharacterEncoding()
- translate locale into encoding.
-
getContentLength()
-
-
getContentType()
-
-
getCookies()
-
-
getFacade()
- One-to-one with Facade.
-
getLocale()
-
-
getOutputStream()
- Either re-implement getOutputStream or return BufferedServletOutputStream(this)
and implement doWrite();
-
getRequest()
-
-
getSessionId()
-
-
getStatus()
-
-
getWriter()
-
-
isBufferCommitted()
-
-
isIncluded()
- True if we are in an included servlet
-
isStarted()
- True if getOutputStream or getWriter was called.
-
isUsingStream()
- True if getOutputStream was called.
-
recycle()
- Response objects will be pool-able
-
reset()
-
-
setBufferSize(int)
-
-
setContentLength(int)
-
-
setContentType(String)
- Set content type - this might also set encoding, if specified
-
setHeader(String, String)
-
-
setIncluded(boolean)
- The response will not set any header or the status line -
it can only write to the output stream or flush.
-
setLocale(Locale)
-
-
setRequest(Request)
- One-to-one relation with Request
-
setSessionId(String)
- Will set the session id.
-
setStatus(int)
-
containsHeader
public abstract boolean containsHeader(String name)
setHeader
public abstract void setHeader(String name,
String value)
addHeader
public abstract void addHeader(String name,
String value)
endHeaders
public abstract void endHeaders() throws IOException
- Signal that we're done with the headers, and body will follow.
Any implementation needs to notify ContextManager, to allow
interceptors to fix headers.
isStarted
public abstract boolean isStarted()
- True if getOutputStream or getWriter was called.
XXX change it to "if any output was writen"
Used by RD.forward() and ServletWrapper.error()
isUsingStream
public abstract boolean isUsingStream()
- True if getOutputStream was called.
Used to avoid the ugly try getWriter() catch getOutputStream.
finish
public abstract void finish() throws IOException
- Signal that we're done with a particular request, the
server can go on and read more requests or close the socket
getOutputStream
public abstract ServletOutputStream getOutputStream()
- Either re-implement getOutputStream or return BufferedServletOutputStream(this)
and implement doWrite();
getWriter
public abstract PrintWriter getWriter() throws IOException
isIncluded
public abstract boolean isIncluded()
- True if we are in an included servlet
setIncluded
public abstract void setIncluded(boolean b)
- The response will not set any header or the status line -
it can only write to the output stream or flush.
This is used to implement RD.include() and can be used for
HTTP/0.9
getBufferSize
public abstract int getBufferSize()
setBufferSize
public abstract void setBufferSize(int size) throws IllegalStateException
isBufferCommitted
public abstract boolean isBufferCommitted()
reset
public abstract void reset() throws IllegalStateException
flushBuffer
public abstract void flushBuffer() throws IOException
- Any implementation needs to notify ContextManger
addCookie
public abstract void addCookie(Cookie cookie)
getCookies
public abstract Enumeration getCookies()
getLocale
public abstract Locale getLocale()
setLocale
public abstract void setLocale(Locale locale)
getCharacterEncoding
public abstract String getCharacterEncoding()
- translate locale into encoding.
setContentType
public abstract void setContentType(String contentType)
- Set content type - this might also set encoding, if specified
getContentType
public abstract String getContentType()
setContentLength
public abstract void setContentLength(int contentLength)
getContentLength
public abstract int getContentLength()
setStatus
public abstract void setStatus(int status)
getStatus
public abstract int getStatus()
setSessionId
public abstract void setSessionId(String sId)
- Will set the session id. The session interceptor might
process it and add a Cookie header, and it can be used to
rewrite URLs.
This replace "system cookies" ( it was the only use for them )
getSessionId
public abstract String getSessionId()
getFacade
public abstract HttpServletResponseFacade getFacade()
- One-to-one with Facade.
You can use HttpResponseFacade.
setRequest
public abstract void setRequest(Request request)
- One-to-one relation with Request
getRequest
public abstract Request getRequest()
recycle
public abstract void recycle()
- Response objects will be pool-able
All Packages Class Hierarchy This Package Previous Next Index