|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectHTTPClient.Request
This class represents an http request. It's used by classes which implement the HTTPClientModule interface.
| Field Summary | |
(package private) boolean |
aborted
was this request aborted by the user? |
(package private) long |
delay_entity
number of millisecs to wait for an error from the server before sending the entity (used when retrying requests) |
(package private) boolean |
dont_pipeline
disable pipelining of following request |
(package private) boolean |
internal_subrequest
is this an internally generated subrequest? |
(package private) int |
num_retries
number of retries so far |
| Constructor Summary | |
Request(HTTPConnection con,
String method,
String req_uri,
NVPair[] headers,
byte[] data,
HttpOutputStream stream,
boolean allow_ui)
Creates a new request structure. |
|
| Method Summary | |
boolean |
allowUI()
|
Object |
clone()
|
void |
copyFrom(Request other)
Copy all the fields from other to this request. |
HTTPConnection |
getConnection()
|
byte[] |
getData()
|
NVPair[] |
getHeaders()
|
String |
getMethod()
|
String |
getRequestURI()
|
HttpOutputStream |
getStream()
|
void |
setAllowUI(boolean allow_ui)
|
void |
setConnection(HTTPConnection con)
|
void |
setData(byte[] data)
|
void |
setHeaders(NVPair[] headers)
|
void |
setMethod(String method)
|
void |
setRequestURI(String req_uri)
|
void |
setStream(HttpOutputStream stream)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
long delay_entity
int num_retries
boolean dont_pipeline
boolean aborted
boolean internal_subrequest
| Constructor Detail |
public Request(HTTPConnection con,
String method,
String req_uri,
NVPair[] headers,
byte[] data,
HttpOutputStream stream,
boolean allow_ui)
con - the current HTTPConnectionmethod - the request methodreq_uri - the request-uriheaders - the request headersdata - the entity as a byte[]stream - the entity as a streamallow_ui - allow user interaction| Method Detail |
public HTTPConnection getConnection()
getConnection in interface RoRequestpublic void setConnection(HTTPConnection con)
con - the HTTPConnection this request is associated withpublic String getMethod()
getMethod in interface RoRequestpublic void setMethod(String method)
method - the request method (e.g. GET, POST, etc)public String getRequestURI()
getRequestURI in interface RoRequestpublic void setRequestURI(String req_uri)
req_uri - the request-uripublic NVPair[] getHeaders()
getHeaders in interface RoRequestpublic void setHeaders(NVPair[] headers)
headers - the headers for this requestpublic byte[] getData()
getData in interface RoRequestpublic void setData(byte[] data)
data - the entity for this requestpublic HttpOutputStream getStream()
getStream in interface RoRequestpublic void setStream(HttpOutputStream stream)
stream - an output stream on which the entity is writtenpublic boolean allowUI()
allowUI in interface RoRequestpublic void setAllowUI(boolean allow_ui)
allow_ui - are modules and handlers allowed to popup windows or
otherwise interact with the user?public Object clone()
public void copyFrom(Request other)
other - the Request to copy frompublic String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||