|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tomcat.core.ResponseImpl
Field Summary | |
protected java.lang.String |
characterEncoding
|
protected boolean |
committed
|
protected java.lang.String |
contentLanguage
|
protected int |
contentLength
|
protected java.lang.String |
contentType
|
protected org.apache.tomcat.util.MimeHeaders |
headers
|
protected BufferedServletOutputStream |
out
|
protected Request |
request
|
protected HttpServletResponseFacade |
responseFacade
|
protected java.lang.String |
sessionId
|
protected static org.apache.tomcat.util.StringManager |
sm
|
protected boolean |
started
|
protected int |
status
|
protected java.util.Vector |
userCookies
|
protected boolean |
usingStream
|
protected boolean |
usingWriter
|
protected java.io.PrintWriter |
writer
|
Constructor Summary | |
ResponseImpl()
|
Method Summary | |
void |
addCookie(javax.servlet.http.Cookie cookie)
|
void |
addHeader(java.lang.String name,
java.lang.String value)
|
boolean |
containsHeader(java.lang.String name)
|
void |
doWrite(byte[] buffer,
int pos,
int count)
Write a chunk of bytes. |
void |
endHeaders()
Signal that we're done with the headers, and body will follow. |
void |
finish()
Signal that we're done with a particular request, the server can go on and read more requests or close the socket |
void |
flushBuffer()
Any implementation needs to notify ContextManger |
java.lang.StringBuffer |
getBody()
|
int |
getBufferSize()
|
java.lang.String |
getCharacterEncoding()
translate locale into encoding. |
int |
getContentLength()
|
java.lang.String |
getContentType()
|
java.util.Enumeration |
getCookies()
|
HttpServletResponseFacade |
getFacade()
One-to-one with Facade. |
java.util.Locale |
getLocale()
|
static java.lang.String |
getMessage(int status)
|
javax.servlet.ServletOutputStream |
getOutputStream()
Either implement ServletOutputStream or return BufferedServletOutputStream(this) and implement doWrite(); |
Request |
getRequest()
|
java.lang.String |
getSessionId()
|
int |
getStatus()
|
java.io.PrintWriter |
getWriter()
|
boolean |
isBufferCommitted()
|
boolean |
isIncluded()
True if we are in an included servlet |
boolean |
isStarted()
True if getOutputStream or getWriter was called. |
boolean |
isUsingStream()
True if getOutputStream was called. |
void |
recycle()
Response objects will be pool-able |
void |
reset()
|
void |
setBufferSize(int size)
|
void |
setContentLength(int contentLength)
|
void |
setContentType(java.lang.String contentType)
Set content type - this might also set encoding, if specified |
void |
setHeader(java.lang.String name,
java.lang.String value)
|
void |
setIncluded(boolean incl)
The response will not set any header or the status line - it can only write to the output stream or flush. |
void |
setLocale(java.util.Locale locale)
|
void |
setRequest(Request request)
One-to-one relation with Request |
void |
setSessionId(java.lang.String id)
Will set the session id. |
void |
setStatus(int status)
Set the response status |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static org.apache.tomcat.util.StringManager sm
protected Request request
protected HttpServletResponseFacade responseFacade
protected java.util.Vector userCookies
protected java.lang.String contentType
protected java.lang.String contentLanguage
protected java.lang.String characterEncoding
protected java.lang.String sessionId
protected int contentLength
protected int status
protected org.apache.tomcat.util.MimeHeaders headers
protected BufferedServletOutputStream out
protected java.io.PrintWriter writer
protected boolean usingStream
protected boolean usingWriter
protected boolean started
protected boolean committed
Constructor Detail |
public ResponseImpl()
Method Detail |
public HttpServletResponseFacade getFacade()
public void setRequest(Request request)
public Request getRequest()
public boolean isIncluded()
public void setIncluded(boolean incl)
public boolean isStarted()
public void recycle()
public void finish() throws java.io.IOException
public boolean containsHeader(java.lang.String name)
public boolean isUsingStream()
public java.io.PrintWriter getWriter() throws java.io.IOException
public void setHeader(java.lang.String name, java.lang.String value)
public void addHeader(java.lang.String name, java.lang.String value)
public int getBufferSize()
public void setBufferSize(int size) throws java.lang.IllegalStateException
public boolean isBufferCommitted()
public void reset() throws java.lang.IllegalStateException
public void flushBuffer() throws java.io.IOException
public void endHeaders() throws java.io.IOException
public void addCookie(javax.servlet.http.Cookie cookie)
public java.util.Enumeration getCookies()
public void setSessionId(java.lang.String id)
public java.lang.String getSessionId()
public java.util.Locale getLocale()
public void setLocale(java.util.Locale locale)
public java.lang.String getCharacterEncoding()
public void setContentType(java.lang.String contentType)
public java.lang.String getContentType()
public void setContentLength(int contentLength)
public int getContentLength()
public int getStatus()
public void setStatus(int status)
public javax.servlet.ServletOutputStream getOutputStream()
public void doWrite(byte[] buffer, int pos, int count) throws java.io.IOException
public java.lang.StringBuffer getBody()
public static java.lang.String getMessage(int status)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |