Class Request
- java.lang.Object
-
- org.exoplatform.common.http.client.Request
-
-
Constructor Summary
Constructors Constructor Description Request(HTTPConnection con, String method, String req_uri, NVPair[] headers, byte[] data, HttpOutputStream stream, boolean allow_ui)Creates a new request structure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowUI()Objectclone()voidcopyFrom(Request other)Copy all the fields from other to this request.HTTPConnectiongetConnection()byte[]getData()NVPair[]getHeaders()StringgetMethod()StringgetRequestURI()HttpOutputStreamgetStream()voidsetAllowUI(boolean allow_ui)voidsetConnection(HTTPConnection con)voidsetData(byte[] data)voidsetHeaders(NVPair[] headers)voidsetMethod(String method)voidsetRequestURI(String req_uri)voidsetStream(HttpOutputStream stream)StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
getConnection
public HTTPConnection getConnection()
- Specified by:
getConnectionin interfaceRoRequest- Returns:
- the HTTPConnection this request is associated with
-
setConnection
public void setConnection(HTTPConnection con)
- Parameters:
con- the HTTPConnection this request is associated with
-
getMethod
public String getMethod()
-
setMethod
public void setMethod(String method)
- Parameters:
method- the request method (e.g. GET, POST, etc)
-
getRequestURI
public String getRequestURI()
- Specified by:
getRequestURIin interfaceRoRequest- Returns:
- the request-uri
-
setRequestURI
public void setRequestURI(String req_uri)
- Parameters:
req_uri- the request-uri
-
getHeaders
public NVPair[] getHeaders()
- Specified by:
getHeadersin interfaceRoRequest- Returns:
- the headers making up this request
-
setHeaders
public void setHeaders(NVPair[] headers)
- 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
public HttpOutputStream getStream()
-
setStream
public void setStream(HttpOutputStream stream)
- 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
public Object clone()
-
copyFrom
public void copyFrom(Request other)
Copy all the fields from other to this request.- Parameters:
other- the Request to copy from
-
-