|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hawk.http.AbstractHttpExecutor
public class AbstractHttpExecutor
An utility to communicate with the targetURL. Apart from sending post requests , this can also also upload file too.
HttpModule
Field Summary | |
---|---|
protected static HttpSessionLocal<HttpSessionInfo> |
httpSessionLocal
|
Constructor Summary | |
---|---|
AbstractHttpExecutor()
|
Method Summary | |
---|---|
java.lang.String |
executeGetRequest(java.lang.String targetURL,
boolean invalidateSession)
requests for a post on the url specified by target url with the parameters specified in the requestparams |
java.lang.String |
executeMultiPartPOST(java.lang.String urlString,
java.util.Map<java.lang.String,java.lang.String> map)
This executes multipart post request. |
java.lang.String |
executePost(java.lang.String targetURL,
java.lang.String postData,
boolean invalidateSession)
This hits the target URL with the post data using the JSESSIONID. |
boolean |
loadSessionInfo(org.apache.commons.httpclient.HttpClient client,
HttpSessionInfo httpSessionInfo)
|
boolean |
setHttpSessionInfo(java.net.URLConnection conn,
boolean invalidateSession)
This stores http session information on the http session local |
static boolean |
setOtherData(java.lang.Object otherData)
Implementors should use this method to set their custom data. |
java.lang.String |
uploadFile(java.lang.String urlString,
java.lang.String exsistingFileName)
This uploads a file to the target URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static HttpSessionLocal<HttpSessionInfo> httpSessionLocal
Constructor Detail |
---|
public AbstractHttpExecutor()
Method Detail |
---|
public static boolean setOtherData(java.lang.Object otherData)
otherData
- input data to be stored on http session
public java.lang.String executePost(java.lang.String targetURL, java.lang.String postData, boolean invalidateSession) throws java.lang.Exception
executePost
in interface IHttpExecutor
targetURL
- target url to hitdata
- post datajsessionid
- used for standard j2ee session management.
java.lang.Exception
public boolean setHttpSessionInfo(java.net.URLConnection conn, boolean invalidateSession)
setHttpSessionInfo
in interface IHttpExecutor
conn
- invalidateSession
-
HttpSessionInfo
,
HttpSessionLocal
public java.lang.String executeMultiPartPOST(java.lang.String urlString, java.util.Map<java.lang.String,java.lang.String> map)
executeMultiPartPOST
in interface IHttpExecutor
urlString
- input url to which data is to be sent.map
- http post data
public java.lang.String uploadFile(java.lang.String urlString, java.lang.String exsistingFileName) throws java.lang.Exception
uploadFile
in interface IHttpExecutor
urlString
- target URL to hitexsistingFileName
- name of the file to uploadjsessionid
- JSESSIONID to use
java.lang.Exception
public java.lang.String executeGetRequest(java.lang.String targetURL, boolean invalidateSession) throws java.lang.Exception
IHttpExecutor
executeGetRequest
in interface IHttpExecutor
invalidateSession
- if true discard the jsessionid parameter
java.lang.Exception
public boolean loadSessionInfo(org.apache.commons.httpclient.HttpClient client, HttpSessionInfo httpSessionInfo)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |