|
|||||||||
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.HttpRequestMessage org.w3c.www.protocol.http.Request
public class Request
The client side idea of a request. Requests are created only by the HttpManager, by cloning its template request that defines the default (application wide) request settings.
Field Summary | |
---|---|
protected boolean |
allowuserinteraction
Are we allowed to interact with the user ? |
protected boolean |
interrupted
Has this request been interrupted ? |
protected HttpManager |
manager
The manager that created this request. |
protected RequestObserver |
observer
The observer for the request, if any. |
protected java.io.InputStream |
output
The request output stream, to PUT or POST data. |
protected boolean |
pipeline
Can we pipeline that request, if appropriate support is detected ? |
protected HttpServer |
server
The server currently running the request, if any. |
Fields inherited from class org.w3c.www.http.HttpRequestMessage |
---|
H_ACCEPT, H_ACCEPT_CHARSET, H_ACCEPT_ENCODING, H_ACCEPT_LANGUAGE, H_AUTHORIZATION, H_EXPECT, H_FROM, H_HOST, H_IF_MATCH, H_IF_MODIFIED_SINCE, H_IF_NONE_MATCH, H_IF_RANGE, H_IF_UNMODIFIED_SINCE, H_MAX_FORWARDS, H_PROXY_AUTHORIZATION, H_RANGE, H_REFERER, H_TE, H_USER_AGENT, method, proxy, sProxy, 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 | |
---|---|
protected |
Request(HttpManager manager)
|
Method Summary | |
---|---|
protected void |
endEmit(java.io.OutputStream out,
int what)
End of header emiting, continue by sending optional output stream. |
boolean |
getAllowUserInteraction()
Are we allowed to do some user interaction to run this request. |
HttpManager |
getManager()
Get this request's manager. |
RequestObserver |
getObserver()
Get the observer for this request. |
java.io.InputStream |
getOutputStream()
Get the input stream to read that request body. |
boolean |
hasOutputStream()
Does this request has an associated input stream ? |
void |
interruptRequest()
Interrupt that request processing. |
boolean |
isInterrupted()
Has this request been interrupted ? |
Reply |
makeReply(int status)
Create a Reply instance matching this request. |
void |
setAllowUserInteraction(boolean onoff)
Decide wether we are allowed to interact wit hthe user. |
void |
setObserver(RequestObserver observer)
Set the observer for this request. |
void |
setOutputStream(java.io.InputStream in)
Set this request output stream. |
void |
setPipeline(boolean onoff)
Enable/disable pipelining for that request. |
protected void |
setServer(HttpServer server)
Mark that request has being run by given server. |
protected void |
unsetServer()
Mark that request as no longer attached to a server object. |
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 |
---|
protected HttpManager manager
protected boolean allowuserinteraction
protected java.io.InputStream output
protected RequestObserver observer
protected boolean pipeline
protected boolean interrupted
protected HttpServer server
Constructor Detail |
---|
protected Request(HttpManager manager)
Method Detail |
---|
protected void setServer(HttpServer server)
server
- The server in charge for that request.protected void unsetServer()
public void setPipeline(boolean onoff)
onoff
- The pipelining toggle.protected void endEmit(java.io.OutputStream out, int what) throws java.io.IOException
endEmit
in class HttpMessage
out
- The output stream to write to.
java.io.IOException
- if an IO error occurs.public boolean getAllowUserInteraction()
public void setAllowUserInteraction(boolean onoff)
onoff
- A boolean, true if interaction is allowed.public void interruptRequest()
public boolean isInterrupted()
public HttpManager getManager()
public void setOutputStream(java.io.InputStream in)
setPipeline
method.
in
- The data to send to the server.public boolean hasOutputStream()
public java.io.InputStream getOutputStream()
public Reply makeReply(int status)
public void setObserver(RequestObserver observer)
observer
- The observer.public RequestObserver getObserver()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |