|
|||||||||
| Home >> All >> org >> apache >> [ coyote overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.coyote
Class Response

java.lang.Objectorg.apache.coyote.Response
- public final class Response
- extends java.lang.Object
Response object.
| Field Summary | |
private long |
bytesWritten
|
protected java.lang.String |
characterEncoding
|
protected boolean |
charsetSet
Has the charset been explicitly set. |
protected boolean |
commited
Committed flag. |
protected java.lang.String |
contentLanguage
|
protected long |
contentLength
|
protected java.lang.String |
contentType
HTTP specific fields. |
private static java.util.Locale |
DEFAULT_LOCALE
Default locale as mandated by the spec. |
protected java.lang.Exception |
errorException
Holds request error exception. |
protected java.lang.String |
errorURI
Request error URI. |
protected org.apache.tomcat.util.http.MimeHeaders |
headers
Response headers. |
ActionHook |
hook
Action hook. |
private java.util.Locale |
locale
|
protected java.lang.String |
message
Status message. |
protected java.lang.Object[] |
notes
Notes. |
protected OutputBuffer |
outputBuffer
Associated output buffer. |
protected Request |
req
|
protected int |
status
Status code. |
| Constructor Summary | |
Response()
|
|
| Method Summary | |
void |
acknowledge()
|
void |
action(ActionCode actionCode,
java.lang.Object param)
|
void |
addHeader(java.lang.String name,
java.lang.String value)
|
private boolean |
checkSpecialHeader(java.lang.String name,
java.lang.String value)
Set internal fields for special header names. |
boolean |
containsHeader(java.lang.String name)
|
void |
doWrite(org.apache.tomcat.util.buf.ByteChunk chunk)
Write a chunk of bytes. |
void |
finish()
|
long |
getBytesWritten()
|
java.lang.String |
getCharacterEncoding()
|
java.lang.String |
getContentLanguage()
Return the content language. |
int |
getContentLength()
|
long |
getContentLengthLong()
|
java.lang.String |
getContentType()
|
java.lang.Exception |
getErrorException()
Get the Exception that occurred during request processing. |
java.lang.String |
getErrorURI()
Get the request URI that caused the original error. |
ActionHook |
getHook()
|
java.util.Locale |
getLocale()
|
java.lang.String |
getMessage()
Get the status message. |
org.apache.tomcat.util.http.MimeHeaders |
getMimeHeaders()
|
java.lang.Object |
getNote(int pos)
|
OutputBuffer |
getOutputBuffer()
|
Request |
getRequest()
|
int |
getStatus()
|
boolean |
isCommitted()
|
boolean |
isExceptionPresent()
|
void |
recycle()
|
void |
reset()
|
void |
sendHeaders()
Signal that we're done with the headers, and body will follow. |
void |
setBytesWritten(long bytesWritten)
|
void |
setCharacterEncoding(java.lang.String charset)
|
void |
setCommitted(boolean v)
|
void |
setContentLength(int contentLength)
|
void |
setContentLength(long contentLength)
|
void |
setContentType(java.lang.String type)
Sets the content type. |
void |
setErrorException(java.lang.Exception ex)
Set the error Exception that occurred during request processing. |
void |
setErrorURI(java.lang.String uri)
Set request URI that caused an error during request processing. |
void |
setHeader(java.lang.String name,
java.lang.String value)
|
void |
setHook(ActionHook hook)
|
void |
setLocale(java.util.Locale locale)
Called explicitely by user to set the Content-Language and the default encoding |
void |
setMessage(java.lang.String message)
Set the status message. |
void |
setNote(int pos,
java.lang.Object value)
|
void |
setOutputBuffer(OutputBuffer outputBuffer)
|
void |
setRequest(Request req)
|
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 |
DEFAULT_LOCALE
private static java.util.Locale DEFAULT_LOCALE
- Default locale as mandated by the spec.
status
protected int status
- Status code.
message
protected java.lang.String message
- Status message.
headers
protected org.apache.tomcat.util.http.MimeHeaders headers
- Response headers.
outputBuffer
protected OutputBuffer outputBuffer
- Associated output buffer.
notes
protected java.lang.Object[] notes
- Notes.
commited
protected boolean commited
- Committed flag.
hook
public ActionHook hook
- Action hook.
contentType
protected java.lang.String contentType
- HTTP specific fields.
contentLanguage
protected java.lang.String contentLanguage
characterEncoding
protected java.lang.String characterEncoding
contentLength
protected long contentLength
locale
private java.util.Locale locale
bytesWritten
private long bytesWritten
errorException
protected java.lang.Exception errorException
- Holds request error exception.
charsetSet
protected boolean charsetSet
- Has the charset been explicitly set.
errorURI
protected java.lang.String errorURI
- Request error URI.
req
protected Request req
| Constructor Detail |
Response
public Response()
| Method Detail |
getRequest
public Request getRequest()
setRequest
public void setRequest(Request req)
getOutputBuffer
public OutputBuffer getOutputBuffer()
setOutputBuffer
public void setOutputBuffer(OutputBuffer outputBuffer)
getMimeHeaders
public org.apache.tomcat.util.http.MimeHeaders getMimeHeaders()
getHook
public ActionHook getHook()
setHook
public void setHook(ActionHook hook)
setNote
public final void setNote(int pos,
java.lang.Object value)
getNote
public final java.lang.Object getNote(int pos)
action
public void action(ActionCode actionCode, java.lang.Object param)
getStatus
public int getStatus()
setStatus
public void setStatus(int status)
- Set the response status
getMessage
public java.lang.String getMessage()
- Get the status message.
setMessage
public void setMessage(java.lang.String message)
- Set the status message.
isCommitted
public boolean isCommitted()
setCommitted
public void setCommitted(boolean v)
setErrorException
public void setErrorException(java.lang.Exception ex)
- Set the error Exception that occurred during
request processing.
getErrorException
public java.lang.Exception getErrorException()
- Get the Exception that occurred during request
processing.
isExceptionPresent
public boolean isExceptionPresent()
setErrorURI
public void setErrorURI(java.lang.String uri)
- Set request URI that caused an error during
request processing.
getErrorURI
public java.lang.String getErrorURI()
- Get the request URI that caused the original error.
reset
public void reset()
throws java.lang.IllegalStateException
finish
public void finish()
throws java.io.IOException
acknowledge
public void acknowledge()
throws java.io.IOException
containsHeader
public boolean containsHeader(java.lang.String name)
setHeader
public void setHeader(java.lang.String name, java.lang.String value)
addHeader
public void addHeader(java.lang.String name, java.lang.String value)
checkSpecialHeader
private boolean checkSpecialHeader(java.lang.String name, java.lang.String value)
- Set internal fields for special header names.
Called from set/addHeader.
Return true if the header is special, no need to set the header.
sendHeaders
public void sendHeaders()
throws java.io.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.
getLocale
public java.util.Locale getLocale()
setLocale
public void setLocale(java.util.Locale locale)
- Called explicitely by user to set the Content-Language and
the default encoding
getContentLanguage
public java.lang.String getContentLanguage()
- Return the content language.
setCharacterEncoding
public void setCharacterEncoding(java.lang.String charset)
getCharacterEncoding
public java.lang.String getCharacterEncoding()
setContentType
public void setContentType(java.lang.String type)
- Sets the content type.
This method must preserve any response charset that may already have
been set via a call to response.setContentType(), response.setLocale(),
or response.setCharacterEncoding().
getContentType
public java.lang.String getContentType()
setContentLength
public void setContentLength(int contentLength)
setContentLength
public void setContentLength(long contentLength)
getContentLength
public int getContentLength()
getContentLengthLong
public long getContentLengthLong()
doWrite
public void doWrite(org.apache.tomcat.util.buf.ByteChunk chunk) throws java.io.IOException
- Write a chunk of bytes.
recycle
public void recycle()
getBytesWritten
public long getBytesWritten()
setBytesWritten
public void setBytesWritten(long bytesWritten)
|
|||||||||
| Home >> All >> org >> apache >> [ coyote overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.coyote.Response