Class Request
java.lang.Object
org.exoplatform.common.http.client.Request
This class represents an http request. It's used by classes which implement
the HTTPClientModule interface.
- Version:
- 0.3-3 06/05/2001
- Author:
- Ronald Tschal�r
-
Constructor Summary
ConstructorsConstructorDescriptionRequest(HTTPConnection con, String method, String req_uri, NVPair[] headers, byte[] data, HttpOutputStream stream, boolean allow_ui) Creates a new request structure. -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowUI()clone()voidCopy all the fields from other to this request.byte[]getData()NVPair[]voidsetAllowUI(boolean allow_ui) voidvoidsetData(byte[] data) voidsetHeaders(NVPair[] headers) voidvoidsetRequestURI(String req_uri) voidsetStream(HttpOutputStream stream) toString()
-
Constructor Details
-
Request
public Request(HTTPConnection con, String method, String req_uri, NVPair[] headers, byte[] data, HttpOutputStream stream, boolean allow_ui) Creates a new request structure.- Parameters:
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 Details
-
getConnection
- Specified by:
getConnectionin interfaceRoRequest- Returns:
- the HTTPConnection this request is associated with
-
setConnection
- Parameters:
con- the HTTPConnection this request is associated with
-
getMethod
-
setMethod
- Parameters:
method- the request method (e.g. GET, POST, etc)
-
getRequestURI
- Specified by:
getRequestURIin interfaceRoRequest- Returns:
- the request-uri
-
setRequestURI
- Parameters:
req_uri- the request-uri
-
getHeaders
- Specified by:
getHeadersin interfaceRoRequest- Returns:
- the headers making up this request
-
setHeaders
- Parameters:
headers- the headers for this request
-
getData
public byte[] getData() -
setData
public void setData(byte[] data) - Parameters:
data- the entity for this request
-
getStream
-
setStream
- Parameters:
stream- an output stream on which the entity is written
-
allowUI
public boolean allowUI() -
setAllowUI
public void setAllowUI(boolean allow_ui) - Parameters:
allow_ui- are modules and handlers allowed to popup windows or otherwise interact with the user?
-
clone
-
copyFrom
Copy all the fields from other to this request.- Parameters:
other- the Request to copy from
-
toString
-