|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectorg.apache.commons.latka.http.RequestImpl
An implementation of a Latka Request interface based on the Jakarta Commons HttpClient package.
| Field Summary | |
static int |
HTTP_PORT
Standard HTTP Port |
static int |
HTTPS_PORT
Standard HTTPS Port |
| Fields inherited from interface org.apache.commons.latka.http.Request |
HTTP_METHOD_GET, HTTP_METHOD_HEAD, HTTP_METHOD_POST |
| Method Summary | |
Response |
execute()
Execute this HTTP request. |
java.lang.String |
getLabel()
Assigns a text label to this request. |
int |
getRequestTiming()
The amount of time it took to execute the request in milliseconds, or -1 if the request has not been executed successfully |
Session |
getSession()
Retrieve the session associated with this request. |
java.net.URL |
getURL()
Gets the URL that Latka will attempt to contact. |
void |
setCredentials(java.lang.String userName,
java.lang.String password)
Sets the basic authentication credentials for this request, if any. |
void |
setHeader(java.lang.String headerName,
java.lang.String headerValue)
Set a header in the request |
void |
setParameter(java.lang.String name,
java.lang.String value)
Associate a parameter with this request. |
void |
setParameters(java.util.Map parameters)
Associate a group of parameters with this request. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int HTTP_PORT
public static final int HTTPS_PORT
| Method Detail |
public Response execute()
throws java.io.IOException
Request
execute in interface Requestjava.io.IOException - if the remote server could not be reachedpublic java.lang.String getLabel()
Request
getLabel in interface Requestpublic int getRequestTiming()
Request
getRequestTiming in interface Requestpublic Session getSession()
getSession in interface RequestSession objectpublic java.net.URL getURL()
Request
getURL in interface Request
public void setCredentials(java.lang.String userName,
java.lang.String password)
Request
setCredentials in interface RequestuserName - user namepassword - user's password
public void setHeader(java.lang.String headerName,
java.lang.String headerValue)
setHeader in interface RequestheaderName - name of any HTTP request headerheaderValue - value of that header
public void setParameter(java.lang.String name,
java.lang.String value)
setParameter in interface Requestname - the lvalue of the parameter
java.lang.IllegalArgumentException - if a parameter is nullpublic void setParameters(java.util.Map parameters)
setParameters in interface Requestparameters - a map of parameters (lvalues -> rvalues)
java.lang.IllegalArgumentException - if a parameter is null or not a String
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||