Constructor and Description |
---|
Request(HTTPConnection con,
java.lang.String method,
java.lang.String req_uri,
NVPair[] headers,
byte[] data,
HttpOutputStream stream,
boolean allow_ui)
Creates a new request structure.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allowUI() |
java.lang.Object |
clone() |
void |
copyFrom(Request other)
Copy all the fields from other to this request.
|
HTTPConnection |
getConnection() |
byte[] |
getData() |
NVPair[] |
getHeaders() |
java.lang.String |
getMethod() |
java.lang.String |
getRequestURI() |
HttpOutputStream |
getStream() |
void |
setAllowUI(boolean allow_ui) |
void |
setConnection(HTTPConnection con) |
void |
setData(byte[] data) |
void |
setHeaders(NVPair[] headers) |
void |
setMethod(java.lang.String method) |
void |
setRequestURI(java.lang.String req_uri) |
void |
setStream(HttpOutputStream stream) |
java.lang.String |
toString() |
public Request(HTTPConnection con, java.lang.String method, java.lang.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 interactionpublic HTTPConnection getConnection()
getConnection
in interface RoRequest
public void setConnection(HTTPConnection con)
con
- the HTTPConnection this request is associated withpublic java.lang.String getMethod()
public void setMethod(java.lang.String method)
method
- the request method (e.g. GET, POST, etc)public java.lang.String getRequestURI()
getRequestURI
in interface RoRequest
public void setRequestURI(java.lang.String req_uri)
req_uri
- the request-uripublic NVPair[] getHeaders()
getHeaders
in interface RoRequest
public void setHeaders(NVPair[] headers)
headers
- the headers for this requestpublic byte[] getData()
public void setData(byte[] data)
data
- the entity for this requestpublic HttpOutputStream getStream()
public void setStream(HttpOutputStream stream)
stream
- an output stream on which the entity is writtenpublic boolean allowUI()
public void setAllowUI(boolean allow_ui)
allow_ui
- are modules and handlers allowed to popup windows or
otherwise interact with the user?public java.lang.Object clone()
clone
in class java.lang.Object
public void copyFrom(Request other)
other
- the Request to copy frompublic java.lang.String toString()
toString
in class java.lang.Object