|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.www.http.HttpMessage org.w3c.www.http.HttpEntityMessage org.w3c.www.http.HttpReplyMessage org.w3c.jigsaw.http.Reply
public class Reply
Field Summary | |
---|---|
protected java.lang.Boolean |
chunkable
Should this reply be chunked ? |
protected static java.lang.String |
chunked
|
protected static HttpTokenList |
CONNECTION
|
protected static HttpMimeType |
DEFAULT_TYPE
|
protected ResourceFilter[] |
filters
|
protected int |
infilters
|
protected boolean |
is_proxy
Is this reply a proxy reply. |
protected java.io.OutputStream |
output
|
Fields inherited from class org.w3c.www.http.HttpReplyMessage |
---|
H_ACCEPT_RANGES, H_AGE, H_AUTHENTICATION_INFO, H_LOCATION, H_PROXY_AUTHENTICATE, H_PUBLIC, H_RETRY_AFTER, H_SERVER, H_VARY, H_WARNING, H_WWW_AUTHENTICATE, reason, status |
Fields inherited from class org.w3c.www.http.HttpEntityMessage |
---|
H_ALLOW, H_CONTENT_BASE, H_CONTENT_ENCODING, H_CONTENT_LANGUAGE, H_CONTENT_LENGTH, H_CONTENT_LOCATION, H_CONTENT_MD5, H_CONTENT_RANGE, H_CONTENT_TYPE, H_ETAG, H_EXPIRES, H_LAST_MODIFIED |
Fields inherited from class org.w3c.www.http.HttpMessage |
---|
descriptors, EMIT_ALL, EMIT_BODY, EMIT_FOOTERS, EMIT_HEADERS, emitdate, factory, H_CACHE_CONTROL, H_CMAN_EXT, H_CONNECTION, H_COOKIE, H_COPT_EXT, H_DATE, H_MAN_EXT, H_OPT_EXT, H_PRAGMA, H_PROTOCOL, H_PROTOCOL_INFO, H_PROTOCOL_QUERY, H_PROTOCOL_REQUEST, H_PROXY_CONNECTION, H_SET_COOKIE, H_TRAILER, H_TRANSFER_ENCODING, H_UPGRADE, H_VIA, headers, major, MAX_HEADERS, minor, state, values |
Constructor Summary | |
---|---|
Reply(Client client)
Create a new Reply instance for the given client. |
|
Reply(Client client,
Request request,
short major,
short minor,
int status)
Create a new reply for the given client. |
Method Summary | |
---|---|
boolean |
canChunkTransfer()
|
void |
dump(java.io.OutputStream out)
|
void |
emit(java.io.OutputStream out,
int what)
|
MimeType |
getContentType()
Get the entity MIME type. |
java.io.FileDescriptor |
getInputFileDescriptor()
Deprecated. |
java.io.OutputStream |
getOutputStream()
Get that reply output stream. |
java.io.OutputStream |
getOutputStream(boolean doEmit)
Get the reply output stream. |
boolean |
hasContentLength()
|
boolean |
hasContentType()
|
boolean |
hasStream()
|
boolean |
isDynamic()
is is dynamic or not? |
boolean |
keepProxyConnection()
|
java.io.InputStream |
openStream()
Open this reply body stream. |
void |
setContent(java.lang.String msg)
Set this reply content. |
void |
setContent(java.lang.String msg,
java.lang.String encoding)
Set this reply content. |
void |
setDynamic(boolean dyn)
set the reply to be a reply for dynamic content |
protected void |
setFilters(ResourceFilter[] filters,
int infilters)
|
void |
setKeepAlive(java.lang.String value)
|
void |
setKeepConnection(boolean onoff)
|
void |
setProxy(boolean onoff)
Mark this reply as being a proxy reply. |
void |
setProxyConnection(java.lang.String value)
|
void |
setStatus(java.lang.Integer status)
|
void |
setStream(HtmlGenerator g)
Sets the reply stream to the given HtmlGenerator stream. |
void |
setStream(java.io.InputStream is)
|
void |
setStream(java.io.InputStream is,
boolean closeOld)
|
boolean |
tryKeepConnection()
|
Methods inherited from class org.w3c.www.http.HttpEntityMessage |
---|
addContentEncoding, getAllow, getContentBase, getContentEncoding, getContentLanguage, getContentLength, getContentLocation, getContentMD5, getContentRange, getETag, getExpires, getLastModified, hasContentRange, setAllow, setContentBase, setContentEncoding, setContentLanguage, setContentLength, setContentLocation, setContentMD5, setContentType, setETag, setExpires, setLastModified |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static HttpMimeType DEFAULT_TYPE
protected static HttpTokenList CONNECTION
protected boolean is_proxy
protected ResourceFilter[] filters
protected int infilters
protected java.io.OutputStream output
protected java.lang.Boolean chunkable
protected static java.lang.String chunked
Constructor Detail |
---|
public Reply(Client client)
client
- The client to who this reply is directed.public Reply(Client client, Request request, short major, short minor, int status)
client
- The client ot who the reply is directed.Method Detail |
---|
public void setDynamic(boolean dyn)
a
- boolean, true if the reply is generated by a dynamicpublic boolean isDynamic()
public void setStatus(java.lang.Integer status)
public boolean hasContentLength()
public boolean hasContentType()
public void setKeepAlive(java.lang.String value)
public void setProxyConnection(java.lang.String value)
public boolean keepProxyConnection()
public java.io.FileDescriptor getInputFileDescriptor()
public void setKeepConnection(boolean onoff)
public boolean tryKeepConnection()
public void setProxy(boolean onoff)
public void setStream(HtmlGenerator g)
g
- The HtmlGenerator whose output is to be used as the reply body.public boolean hasStream()
public java.io.InputStream openStream()
public void setStream(java.io.InputStream is)
public void setStream(java.io.InputStream is, boolean closeOld)
protected void setFilters(ResourceFilter[] filters, int infilters)
public java.io.OutputStream getOutputStream(boolean doEmit) throws java.io.IOException
doEmit
- Emit that reply before giving out the output stream.
java.io.IOException
- If the output stream could not get opened.public java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
- If the output stream could not get opened.public boolean canChunkTransfer()
public void setContent(java.lang.String msg, java.lang.String encoding)
msg
- The reply content.encoding,
- the encoding of the replypublic void emit(java.io.OutputStream out, int what) throws java.io.IOException
emit
in class HttpMessage
out
- The output stream to emit the message to.what
- (fixme doc)
java.io.IOException
- If the message couldn't be emited to the
given stream, due to IO errors.public void dump(java.io.OutputStream out)
dump
in class HttpReplyMessage
public void setContent(java.lang.String msg)
setContent
in interface ReplyInterface
msg
- The reply content.public MimeType getContentType()
getContentType
in class HttpEntityMessage
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |