|
|||||||||
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
public class HttpReplyMessage
Field Summary | |
---|---|
static int |
H_ACCEPT_RANGES
|
static int |
H_AGE
|
static int |
H_AUTHENTICATION_INFO
|
static int |
H_LOCATION
|
static int |
H_PROXY_AUTHENTICATE
|
static int |
H_PUBLIC
|
static int |
H_RETRY_AFTER
|
static int |
H_SERVER
|
static int |
H_VARY
|
static int |
H_WARNING
|
static int |
H_WWW_AUTHENTICATE
|
protected java.lang.String |
reason
The reason phrase. |
protected int |
status
The status associated with this reply. |
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 | |
---|---|
HttpReplyMessage()
|
|
HttpReplyMessage(MimeParser parser)
|
Method Summary | |
---|---|
void |
addAuthenticationInfo(java.lang.String name,
java.lang.String value)
Add the given parameter/value pair to the Authentication Info header |
void |
addWarning(HttpWarning warning)
Add a warning to this reply message. |
boolean |
checkMustRevalidate()
Check the must-revalidate directive of the cache control
header. |
boolean |
checkProxyRevalidate()
Check the proxy-revalidate directive of the cache control
header. |
boolean |
checkPublic()
Check the public directive of the cache control header. |
void |
dump(java.io.OutputStream out)
|
java.lang.String[] |
getAcceptRanges()
Get the list of accepted ranges. |
int |
getAge()
Get the age of the attached entity. |
HttpParamList |
getAuthenticationInfo()
Get the Authentication Info (see digest auth) attached to this reply. |
java.lang.String |
getLocation()
Get the location of the reply. |
java.lang.String[] |
getPrivate()
Get the private directive of the cache control header. |
HttpChallenge |
getProxyAuthenticate()
Get the proxy authentication challenge from this reply. |
java.lang.String[] |
getPublic()
Get the list of publicly allowed methods on queried resource. |
java.lang.String |
getReason()
Get the reason phrase for this reply. |
java.lang.String |
getServer()
Get the description of the server that generated this reply. |
java.lang.String |
getStandardReason(int status)
Get the standard HTTP reason phrase for the given status code. |
int |
getStatus()
Get this reply status code. |
java.lang.String[] |
getVary()
Get the vary header value. |
HttpWarning[] |
getWarning()
Get the list of warnings attached to this reply. |
HttpChallenge |
getWWWAuthenticate()
Get the challenge attached to this reply. |
boolean |
notifyBeginParsing(MimeParser parser)
MimeHeaderHolder implementation - Begining of reply parsing. |
void |
setAcceptRanges(java.lang.String[] units)
Set the list of units in which range requests are accepted. |
void |
setAge(int age)
Set the age of the attached entity. |
void |
setAuthenticationInfo(HttpParamList plist)
Attach Authentication Info to this reply. |
void |
setLocation(java.lang.String location)
Set the location value of the reply. |
void |
setLocation(java.net.URL location)
Set the location value of the reply. |
void |
setMustRevalidate(boolean onoff)
Set the must-revalidate cache control directive. |
void |
setProxyAuthenticate(HttpChallenge challenge)
Set thye proxy authentication challenge on this reply. |
void |
setProxyRevalidate(boolean onoff)
Set the proxy-revalidate cache control directive. |
void |
setPublic(boolean onoff)
Set the public cache control directive. |
void |
setPublic(java.lang.String[] mth)
Set the list of allowed method on queried resource. |
void |
setReason(java.lang.String reason)
Set the reason phrase of this reply. |
void |
setRetryAfter(int delay)
set the retry after as a delay |
void |
setRetryAfter(long date)
set the retry after as a date |
void |
setServer(java.lang.String server)
Set the description of the server. |
void |
setStatus(int status)
Set this reply status code. |
void |
setVary(java.lang.String[] varies)
Set the vary header value. |
void |
setWarning(HttpWarning[] warnings)
Set the warning list attached to this reply. |
void |
setWWWAuthenticate(HttpChallenge challenge)
Attach a challenge to this reply. |
protected void |
startEmit(java.io.OutputStream out,
int what)
Emit the status line before emiting the actual reply headers. |
Methods inherited from class org.w3c.www.http.HttpEntityMessage |
---|
addContentEncoding, getAllow, getContentBase, getContentEncoding, getContentLanguage, getContentLength, getContentLocation, getContentMD5, getContentRange, getContentType, 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 |
---|
public static int H_ACCEPT_RANGES
public static int H_AGE
public static int H_LOCATION
public static int H_PROXY_AUTHENTICATE
public static int H_PUBLIC
public static int H_RETRY_AFTER
public static int H_SERVER
public static int H_VARY
public static int H_WARNING
public static int H_WWW_AUTHENTICATE
public static int H_AUTHENTICATION_INFO
protected int status
protected java.lang.String reason
Constructor Detail |
---|
public HttpReplyMessage(MimeParser parser)
public HttpReplyMessage()
Method Detail |
---|
protected void startEmit(java.io.OutputStream out, int what) throws java.io.IOException
startEmit
in class HttpMessage
out
- The output stream to emit the reply to.
java.io.IOException
- if an IO error occurs.public void dump(java.io.OutputStream out)
dump
in class HttpMessage
public boolean notifyBeginParsing(MimeParser parser) throws HttpParserException, java.io.IOException
Otherwise, we parse the status line, and return false to make the MIME parser continue.
notifyBeginParsing
in interface MimeHeaderHolder
notifyBeginParsing
in class HttpMessage
parser
- The Mime parser.
java.io.IOException
- If some IO error occured while reading the
stream.
HttpParserException
- if parsing failed.public java.lang.String getStandardReason(int status)
status
- The given status code.
public int getStatus()
public void setStatus(int status)
status
- The status code for this reply.public java.lang.String getReason()
public void setReason(java.lang.String reason)
reason
- The reason phrase for this reply.public java.lang.String[] getPrivate()
private
directive of the cache control header.
public boolean checkPublic()
public
directive of the cache control header.
public void setPublic(boolean onoff)
public
cache control directive.
onoff
- Set it on or off.public boolean checkProxyRevalidate()
proxy-revalidate
directive of the cache control
header.
public void setProxyRevalidate(boolean onoff)
proxy-revalidate
cache control directive.
onoff
- Set it on or off.public boolean checkMustRevalidate()
must-revalidate
directive of the cache control
header.
public void setMustRevalidate(boolean onoff)
must-revalidate
cache control directive.
onoff
- Set it on or off.public java.lang.String[] getAcceptRanges()
public void setAcceptRanges(java.lang.String[] units)
units
- The list of units, encoded as a String array, or
null to reset the value.public int getAge()
public void setAge(int age)
age
- The age of the attached entity as a number of seconds,
or null to reset the value.public java.lang.String getLocation()
public void setLocation(java.net.URL location)
location
- The location an URL instance, or null
to reset the value.public void setLocation(java.lang.String location)
location
- The location a String, or null to
reset the value.public HttpChallenge getProxyAuthenticate()
public void setProxyAuthenticate(HttpChallenge challenge)
challenge
- The challenge to set, or null
to reset the value.public java.lang.String[] getPublic()
public void setPublic(java.lang.String[] mth)
mth
- The list of public methods, encoded as a String array, or
null to reset the value.public java.lang.String getServer()
public void setServer(java.lang.String server)
server
- The String decribing the server, or null
to reset the value.public void setRetryAfter(int delay)
an
- integer representing the delay, in secondspublic void setRetryAfter(long date)
long
- the date as a longpublic java.lang.String[] getVary()
*
(if varies on all headers),
or null if undefined.public void setVary(java.lang.String[] varies)
varies
- The list of headers on which this resource varies, or
null to reset the value.public HttpWarning[] getWarning()
public void setWarning(HttpWarning[] warnings)
warnings
- An array of warnings to attach to the given reply,
or null to reset the value.public void addWarning(HttpWarning warning)
warning
- The warning to add.public HttpChallenge getWWWAuthenticate()
public void setWWWAuthenticate(HttpChallenge challenge)
challenge
- The challenge to be attached to the reply, or
null to reset the value.public HttpParamList getAuthenticationInfo()
public void setAuthenticationInfo(HttpParamList plist)
plist,
- the parameter list to be attached to the reply, or
null to reset the value.public void addAuthenticationInfo(java.lang.String name, java.lang.String value)
String
- the name of the valueString
- the value
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |