|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.w3c.www.http.HttpMessage | +--org.w3c.www.http.HttpEntityMessage | +--org.w3c.www.http.HttpRequestMessage
Field Summary | |
static int |
H_ACCEPT
|
static int |
H_ACCEPT_CHARSET
|
static int |
H_ACCEPT_ENCODING
|
static int |
H_ACCEPT_LANGUAGE
|
static int |
H_AUTHORIZATION
|
static int |
H_EXPECT
|
static int |
H_FROM
|
static int |
H_HOST
|
static int |
H_IF_MATCH
|
static int |
H_IF_MODIFIED_SINCE
|
static int |
H_IF_NONE_MATCH
|
static int |
H_IF_RANGE
|
static int |
H_IF_UNMODIFIED_SINCE
|
static int |
H_MAX_FORWARDS
|
static int |
H_PROXY_AUTHORIZATION
|
static int |
H_RANGE
|
static int |
H_REFERER
|
static int |
H_TE
|
static int |
H_USER_AGENT
|
protected java.lang.String |
method
The method to execute on the target resource. |
protected java.net.URL |
proxy
The proxy to use for that request, if any. |
protected java.lang.String |
sProxy
|
protected java.net.URL |
url
The target resource, identified by its URL. |
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 | |
HttpRequestMessage()
|
|
HttpRequestMessage(MimeParser parser)
|
Method Summary | |
void |
dump(java.io.OutputStream out)
|
HttpAccept[] |
getAccept()
Get this request accept list. |
HttpAcceptCharset[] |
getAcceptCharset()
Get the list of accepted charsets for this request. |
HttpAcceptEncoding[] |
getAcceptEncoding()
Get the list of accepted encodings. |
HttpAcceptLanguage[] |
getAcceptLanguage()
Get the list of accepted languages for this request. |
HttpCredential |
getAuthorization()
Get the authorization associated with this request. |
java.lang.String |
getExpect()
Get this request's Expect header value. |
java.lang.String |
getFrom()
Get the originator (from header value) of the request. |
java.lang.String |
getHost()
Get the host header. |
HttpEntityTag[] |
getIfMatch()
Get the conditional matching set of entity tags. |
long |
getIfModifiedSince()
Get the if-modified-since conditional. |
HttpEntityTag[] |
getIfNoneMatch()
Get the conditional none matching entity tags. |
HttpEntityTag |
getIfRange()
Get the if-range conditional if any. |
long |
getIfUnmodifiedSince()
Get the if unmodified since conditional date. |
int |
getMaxForwards()
Get the maximum allowed count of hops for the request. |
int |
getMaxStale()
Get the max-stale directive value of the cache control
header. |
java.lang.String |
getMethod()
Get this request's method. |
int |
getMinFresh()
Get the min-fresh directive value of the cache control
header. |
java.net.URL |
getProxy()
Get the proxy to use for that request. |
HttpCredential |
getProxyAuthorization()
Get the authorization associated with this request. |
HttpRange[] |
getRange()
Get the ranges queried by this request. |
java.lang.String |
getReferer()
Get the referer of the request. |
protected java.lang.String |
getTarget()
|
HttpAcceptEncoding[] |
getTE()
Get the list of restricted transfer encodings. |
java.net.URL |
getURL()
Get this request's target URI. |
java.lang.String |
getUserAgent()
Get the user agent String. |
boolean |
hasAuthorization()
Does this request has some specific authorization infos. |
boolean |
hasProxy()
Will this request use a proxy when executed ? |
static void |
main(java.lang.String[] args)
|
boolean |
notifyBeginParsing(MimeParser parser)
MimeHeaderHolder implementation - HTTP message about to be parsed. |
void |
notifyEndParsing(MimeParser parser)
All the headers have been parsed, take any appropriate actions. |
void |
setAccept(HttpAccept[] accepts)
Set the list of accept clauses attached to this request. |
void |
setAcceptCharset(HttpAcceptCharset[] charsets)
Set the list of accepted charsets for this request. |
void |
setAcceptEncoding(HttpAcceptEncoding[] encoding)
Set the list of accepted encodings. |
void |
setAcceptLanguage(HttpAcceptCharset[] langs)
Set the list of accepted languages for this request. |
void |
setAuthorization(HttpCredential credentials)
Set the authorization associated with this request. |
void |
setExpect(java.lang.String expect)
Set this request's Expect header. |
void |
setFrom(java.lang.String from)
Set the originator of this request. |
void |
setHost(java.lang.String host)
Set the host header value. |
void |
setIfMatch(HttpEntityTag[] etags)
Set the conditional matching set of entity tags. |
void |
setIfModifiedSince(long ims)
Set the if-modified-since conditional. |
void |
setIfNoneMatch(HttpEntityTag[] etags)
Set the conditional none matching entity tags. |
void |
setIfRange(HttpEntityTag etag)
Set the if-range header value. |
void |
setIfUnmodifiedSince(long date)
Set the if-unmodified-since conditional date. |
void |
setMaxForwards(int hops)
Set the maximum allowed count of hops for that request. |
void |
setMaxStale(int maxstale)
Set the max-stale directive value. |
void |
setMethod(java.lang.String method)
Set this request's method. |
void |
setMinFresh(int minfresh)
Set the min-fresh directive value of the cache control
header. |
void |
setProxy(java.net.URL proxy)
Set the proxy to use for that request. |
void |
setProxyAuthorization(HttpCredential credentials)
Set the proxy authorization associated with that request. |
void |
setRange(HttpRange[] ranges)
Set the ranges queried by this request. |
void |
setReferer(java.lang.String referer)
Set the referer of this request. |
protected void |
setTarget(java.lang.String target)
|
void |
setTE(HttpAcceptEncoding[] encoding)
Set the list of restricted transfer encodings |
void |
setURL(java.net.URL url)
Set this request URI. |
void |
setUserAgent(java.lang.String ua)
Set the user agent description header. |
protected void |
startEmit(java.io.OutputStream out,
int what)
This message is about to be emited, emit the request-line first ! |
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
public static int H_ACCEPT_CHARSET
public static int H_ACCEPT_ENCODING
public static int H_ACCEPT_LANGUAGE
public static int H_AUTHORIZATION
public static int H_EXPECT
public static int H_FROM
public static int H_HOST
public static int H_IF_MODIFIED_SINCE
public static int H_IF_MATCH
public static int H_IF_NONE_MATCH
public static int H_IF_RANGE
public static int H_IF_UNMODIFIED_SINCE
public static int H_MAX_FORWARDS
public static int H_PROXY_AUTHORIZATION
public static int H_RANGE
public static int H_REFERER
public static int H_TE
public static int H_USER_AGENT
protected java.lang.String method
protected java.net.URL url
protected java.net.URL proxy
protected java.lang.String sProxy
Constructor Detail |
public HttpRequestMessage(MimeParser parser)
public HttpRequestMessage()
Method Detail |
protected void startEmit(java.io.OutputStream out, int what) throws java.io.IOException
out
- The output stream to emit the request to.public void dump(java.io.OutputStream out)
public boolean notifyBeginParsing(MimeParser parser) throws HttpParserException, java.io.IOException
public void notifyEndParsing(MimeParser parser) throws HttpParserException, java.io.IOException
parser
- The Mime parser.protected void setTarget(java.lang.String target)
protected java.lang.String getTarget()
public java.lang.String getMethod()
public void setMethod(java.lang.String method)
mth
- The request method.public java.net.URL getURL()
public void setURL(java.net.URL url)
setHost
method for how to set the actual
host of the target resource.url
- The target URL of the request, as an URL instance.public int getMinFresh()
min-fresh
directive value of the cache control
header.public void setMinFresh(int minfresh)
min-fresh
directive value of the cache control
header.minfresh
- The min-fresh value, in seconds, or -1
to reset value.public int getMaxStale()
max-stale
directive value of the cache control
header.public void setMaxStale(int maxstale)
max-stale
directive value.maxstale
- A number of seconds giving the allowed drift for
a resource that is no more valid, or -1 to reset
the value.public HttpAccept[] getAccept()
public void setAccept(HttpAccept[] accepts)
accepts
- The list of accept clauses encoded as an array
of HttpAccept instances, or null to reset the value.public HttpAcceptCharset[] getAcceptCharset()
public void setAcceptCharset(HttpAcceptCharset[] charsets)
charsets
- The list of accepted charsets, encoded as an array
of HttpAcceptCharset instances, or null to reset
the value.public HttpAcceptEncoding[] getAcceptEncoding()
public void setAcceptEncoding(HttpAcceptEncoding[] encoding)
encodings
- The list of accepted encodings, as an array,
of HttpAcceptEncoding or null to reset the value.public HttpAcceptLanguage[] getAcceptLanguage()
public void setAcceptLanguage(HttpAcceptCharset[] langs)
langs
- The list of accepted languages, encoded as an array
of HttpAcceptLanguage instances, or null to reset
value.public HttpCredential getAuthorization()
public void setAuthorization(HttpCredential credentials)
credentials
- The credentials to attach to this request, or
null to reset the value.public boolean hasAuthorization()
public java.lang.String getFrom()
public void setFrom(java.lang.String from)
from
- The description of the originator, as an email address,
or null to reset the value.public java.lang.String getHost()
public void setHost(java.lang.String host)
host
- The String representing the target host of the request,
or null to reset the value.public long getIfModifiedSince()
public void setIfModifiedSince(long ims)
ims
- The date of last modification, as the number of milliseconds
since Java epoch, or -1 to reset the value.public HttpEntityTag[] getIfMatch()
public void setIfMatch(HttpEntityTag[] etags)
etags
- An array of HttpEntityTag, one per item in the set, or
null to reset the header value.public HttpEntityTag[] getIfNoneMatch()
public void setIfNoneMatch(HttpEntityTag[] etags)
etags
- An array of HttpEntityTag, one per item in the set,
or null to reset the value.public HttpEntityTag getIfRange()
If-Range
header that
contains date value (if you want to discuss why, send me email)public void setIfRange(HttpEntityTag etag)
etag
- The contional etag, or null to reset
previous setting.public long getIfUnmodifiedSince()
public void setIfUnmodifiedSince(long date)
date
- The date, encoded as the number of milliseconds since
Java epoch, or -1 to reset value.public int getMaxForwards()
public void setMaxForwards(int hops)
hops
- The hops count, or -1 to reset value.public void setProxyAuthorization(HttpCredential credentials)
credentials
- The credentials, or null to
reset the value.public HttpCredential getProxyAuthorization()
public HttpRange[] getRange()
public void setRange(HttpRange[] ranges)
ranges
- The list of ranges, encoded as an array of instances
of HttpRange, or null to reset the value.public java.lang.String getReferer()
public void setReferer(java.lang.String referer)
referer
- The referer of the request, or null
to reset the value.public java.lang.String getUserAgent()
public void setUserAgent(java.lang.String ua)
ua
- The description of the user agent emiting the request, or
null to reset the value.public java.lang.String getExpect()
public void setExpect(java.lang.String expect)
exp
- The value of the header (ex: "100-continue".public HttpAcceptEncoding[] getTE()
public void setTE(HttpAcceptEncoding[] encoding)
encodings
- The list of accepted encodings, as an array,
of HttpAcceptEncoding or null to reset the value.public void setProxy(java.net.URL proxy)
proxy
- The proxy's URL, or null to reset value.public java.net.URL getProxy()
public boolean hasProxy()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |