|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.edg.security.httpclient.HTTPJavaClient
Class implementing a client API to send HTTP requests to a web server. The API library is based on the functionality originally implemented by jwget (the Java port of wget). It can send http(s) GET, POST, HEAD, PUT, DELETE to a destination URL, with a wide range of optional data. It offers SSL and Globus Grid Proxy integration.
Constructor Summary | |
HTTPJavaClient()
|
Method Summary | |
GenericResponse |
connectURL(java.lang.String method,
java.lang.String url,
java.util.Properties addHeaders,
PostBody body,
java.util.Properties options)
Sends a generic HTTP request to the destination file specified by the URL. |
GenericResponse |
getURL(java.lang.String url,
java.util.Properties options)
Sends GET request to the destination file specified by the URL. |
void |
init(java.util.Properties initConfig)
Initializes the security context of the HTTPJavaClient by setting configuration parameters as Log4j configuration file, proxy server, username/password, SSL certificate and key location, grid-proxy file location, authorization role and authorization policy. |
GenericResponse |
postURL(java.lang.String url,
PostBody body,
java.util.Properties options)
Sends POST request, with POST data, to the destination file specified by the URL. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HTTPJavaClient()
Method Detail |
public void init(java.util.Properties initConfig)
initConfig
- collection of initialization parameters for the security
context.public GenericResponse getURL(java.lang.String url, java.util.Properties options)
url
- absolute path of the destination file.options
- collection of optional parameters.
java.lang.RuntimeException
- if the destination URL is null.public GenericResponse postURL(java.lang.String url, PostBody body, java.util.Properties options)
url
- absolute path of the destination file.body
- data to be POSTed.options
- collection of optional parameters.
java.lang.RuntimeException
- if destination URL or body are null.public GenericResponse connectURL(java.lang.String method, java.lang.String url, java.util.Properties addHeaders, PostBody body, java.util.Properties options)
method
- connection method to be used.url
- absolute path of the destination file.addHeaders
- collection of additional headers.body
- data to be saved in the server host (only for
POST and PUT operations).options
- collection of optional parameters.
java.lang.RuntimeException
- if connection method or destination URL
are null.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |