com.ibm.security.access.httpclient
Class HttpClient

java.lang.Object
  extended by com.ibm.security.access.httpclient.HttpClient

public class HttpClient
extends java.lang.Object

Implementation of a HTTP Client. Relies on com.tivoli.am.fim.soap.client implementation of HttpClient.


Field Summary
static java.lang.String HttpClient_java_copyright
           
static java.lang.String HttpClient_java_sourceCodeID
           
 
Constructor Summary
HttpClient()
           
 
Method Summary
static HttpResponse httpGet(java.lang.String urlstr)
          HTTP client GET method.
static HttpResponse httpGet(java.lang.String urlstr, Headers headers, java.lang.String httpsTrustStore, java.lang.String basicAuthUsername, java.lang.String basicAuthPassword, java.lang.String clientKeyStore, java.lang.String clientKeyAlias)
          HTTP client GET method.
static HttpResponse httpGet(java.lang.String urlstr, Headers headers, java.lang.String httpsTrustStore, java.lang.String basicAuthUsername, java.lang.String basicAuthPassword, java.lang.String clientKeyStore, java.lang.String clientKeyAlias, java.lang.String protocol)
          HTTP client GET method.
static HttpResponse httpPost(java.lang.String urlstr, Headers headers, Parameters params, java.lang.String httpsTrustStore, java.lang.String basicAuthUsername, java.lang.String basicAuthPassword, java.lang.String clientKeyStore, java.lang.String clientKeyAlias)
          HTTP client POST method.
static HttpResponse httpPost(java.lang.String urlstr, Headers headers, Parameters params, java.lang.String httpsTrustStore, java.lang.String basicAuthUsername, java.lang.String basicAuthPassword, java.lang.String clientKeyStore, java.lang.String clientKeyAlias, java.lang.String protocol)
          HTTP client POST method.
static HttpResponse httpPost(java.lang.String urlstr, Headers headers, java.lang.String body, java.lang.String httpsTrustStore, java.lang.String basicAuthUsername, java.lang.String basicAuthPassword, java.lang.String clientKeyStore, java.lang.String clientKeyAlias)
          HTTP client POST method.
static HttpResponse httpPost(java.lang.String urlstr, Parameters params)
          HTTP client POST method.
static HttpResponse httpPut(java.lang.String urlstr, Headers headers, Parameters params, java.lang.String httpsTrustStore, java.lang.String basicAuthUsername, java.lang.String basicAuthPassword, java.lang.String clientKeyStore, java.lang.String clientKeyAlias)
          HTTP client PUT method.
static HttpResponse httpPut(java.lang.String urlstr, Headers headers, Parameters params, java.lang.String httpsTrustStore, java.lang.String basicAuthUsername, java.lang.String basicAuthPassword, java.lang.String clientKeyStore, java.lang.String clientKeyAlias, java.lang.String protocol)
          HTTP client PUT method.
static HttpResponse httpPut(java.lang.String urlstr, Headers headers, java.lang.String body, java.lang.String httpsTrustStore, java.lang.String basicAuthUsername, java.lang.String basicAuthPassword, java.lang.String clientKeyStore, java.lang.String clientKeyAlias)
          HTTP client PUT method.
static HttpResponse httpPut(java.lang.String urlstr, Parameters params)
          HTTP client PUT method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HttpClient_java_sourceCodeID

public static final java.lang.String HttpClient_java_sourceCodeID
See Also:
Constant Field Values

HttpClient_java_copyright

public static final java.lang.String HttpClient_java_copyright
See Also:
Constant Field Values
Constructor Detail

HttpClient

public HttpClient()
Method Detail

httpGet

public static HttpResponse httpGet(java.lang.String urlstr)
HTTP client GET method.

Parameters:
urlstr - URL
Returns:
The HTTP response. Null if invalid URL or no response.

httpGet

public static HttpResponse httpGet(java.lang.String urlstr,
                                   Headers headers,
                                   java.lang.String httpsTrustStore,
                                   java.lang.String basicAuthUsername,
                                   java.lang.String basicAuthPassword,
                                   java.lang.String clientKeyStore,
                                   java.lang.String clientKeyAlias)
HTTP client GET method.

Parameters:
urlstr - URL
headers - Headers to be added to the request header.
httpsTrustStore - The name of the trust store to use. If a HTTPS connection is required and this is set to NULL, the default trust store specified in the override configs will be used.
basicAuthUsername - Basic-auth username. If null, basic-auth will be disabled.
basicAuthPassword - Basic-auth password. If null, basic-auth will be disabled.
clientKeyStore - Client key store. If null, client cert auth will be disabled.
clientKeyAlias - Client key alias. If null, client cert auth will be disabled.
Returns:
The HTTP response. Null if invalid URL or no response.

httpGet

public static HttpResponse httpGet(java.lang.String urlstr,
                                   Headers headers,
                                   java.lang.String httpsTrustStore,
                                   java.lang.String basicAuthUsername,
                                   java.lang.String basicAuthPassword,
                                   java.lang.String clientKeyStore,
                                   java.lang.String clientKeyAlias,
                                   java.lang.String protocol)
HTTP client GET method.

Parameters:
urlstr - URL
headers - Headers to be added to the request header.
httpsTrustStore - The name of the trust store to use. If a HTTPS connection is required and this is set to NULL, the default trust store specified in the override configs will be used.
basicAuthUsername - Basic-auth username. If null, basic-auth will be disabled.
basicAuthPassword - Basic-auth password. If null, basic-auth will be disabled.
clientKeyStore - Client key store. If null, client cert auth will be disabled.
clientKeyAlias - Client key alias. If null, client cert auth will be disabled.
sslProtocol - SSL protocol to use for this connection (e.g. TLS)
Returns:
The HTTP response. Null if invalid URL or no response.

httpPost

public static HttpResponse httpPost(java.lang.String urlstr,
                                    Parameters params)
HTTP client POST method.

Parameters:
urlstr - URL
params - Parameters to be added to the request body.
Returns:
The HTTP response. Null if invalid URL or no response.

httpPost

public static HttpResponse httpPost(java.lang.String urlstr,
                                    Headers headers,
                                    java.lang.String body,
                                    java.lang.String httpsTrustStore,
                                    java.lang.String basicAuthUsername,
                                    java.lang.String basicAuthPassword,
                                    java.lang.String clientKeyStore,
                                    java.lang.String clientKeyAlias)
HTTP client POST method.

Parameters:
urlstr - URL
headers - Headers to be added to the request header.
body - A String representation of the HTTP POST Body
httpsTrustStore - The trust store to use. If a HTTPS connection is required and this is set to NULL, the default trust store specified in the override configs will be used.
basicAuthUsername - Basic-auth username. If null, basic-auth will be disabled.
basicAuthPassword - Basic-auth password. If null, basic-auth will be disabled.
clientKeyStore - Client key store. If null, client cert auth will be disabled.
clientKeyAlias - Client key alias. If null, client cert auth will be disabled.
Returns:
The HTTP response. Null if invalid URL or no response.

httpPost

public static HttpResponse httpPost(java.lang.String urlstr,
                                    Headers headers,
                                    Parameters params,
                                    java.lang.String httpsTrustStore,
                                    java.lang.String basicAuthUsername,
                                    java.lang.String basicAuthPassword,
                                    java.lang.String clientKeyStore,
                                    java.lang.String clientKeyAlias)
HTTP client POST method.

Parameters:
urlstr - URL
headers - Headers to be added to the request header.
params - Parameters to be added to the request body.
httpsTrustStore - The trust store to use. If a HTTPS connection is required and this is set to NULL, the default trust store specified in the override configs will be used.
basicAuthUsername - Basic-auth username. If null, basic-auth will be disabled.
basicAuthPassword - Basic-auth password. If null, basic-auth will be disabled.
clientKeyStore - Client key store. If null, client cert auth will be disabled.
clientKeyAlias - Client key alias. If null, client cert auth will be disabled.
Returns:
The HTTP response. Null if invalid URL or no response.

httpPost

public static HttpResponse httpPost(java.lang.String urlstr,
                                    Headers headers,
                                    Parameters params,
                                    java.lang.String httpsTrustStore,
                                    java.lang.String basicAuthUsername,
                                    java.lang.String basicAuthPassword,
                                    java.lang.String clientKeyStore,
                                    java.lang.String clientKeyAlias,
                                    java.lang.String protocol)
HTTP client POST method.

Parameters:
urlstr - URL
headers - Headers to be added to the request header.
params - Parameters to be added to the request body.
httpsTrustStore - The trust store to use. If a HTTPS connection is required and this is set to NULL, the default trust store specified in the override configs will be used.
basicAuthUsername - Basic-auth username. If null, basic-auth will be disabled.
basicAuthPassword - Basic-auth password. If null, basic-auth will be disabled.
clientKeyStore - Client key store. If null, client cert auth will be disabled.
clientKeyAlias - Client key alias. If null, client cert auth will be disabled.
Returns:
The HTTP response. Null if invalid URL or no response.

httpPut

public static HttpResponse httpPut(java.lang.String urlstr,
                                   Parameters params)
HTTP client PUT method.

Parameters:
urlstr - URL
params - Parameters to be added to the request body.
Returns:
The HTTP response. Null if invalid URL or no response.

httpPut

public static HttpResponse httpPut(java.lang.String urlstr,
                                   Headers headers,
                                   java.lang.String body,
                                   java.lang.String httpsTrustStore,
                                   java.lang.String basicAuthUsername,
                                   java.lang.String basicAuthPassword,
                                   java.lang.String clientKeyStore,
                                   java.lang.String clientKeyAlias)
HTTP client PUT method.

Parameters:
urlstr - URL
headers - Headers to be added to the request header.
body - A String representation of the HTTP PUT Body
httpsTrustStore - The trust store to use. If a HTTPS connection is required and this is set to NULL, the default trust store specified in the override configs will be used.
basicAuthUsername - Basic-auth username. If null, basic-auth will be disabled.
basicAuthPassword - Basic-auth password. If null, basic-auth will be disabled.
clientKeyStore - Client key store. If null, client cert auth will be disabled.
clientKeyAlias - Client key alias. If null, client cert auth will be disabled.
Returns:
The HTTP response. Null if invalid URL or no response.

httpPut

public static HttpResponse httpPut(java.lang.String urlstr,
                                   Headers headers,
                                   Parameters params,
                                   java.lang.String httpsTrustStore,
                                   java.lang.String basicAuthUsername,
                                   java.lang.String basicAuthPassword,
                                   java.lang.String clientKeyStore,
                                   java.lang.String clientKeyAlias)
HTTP client PUT method.

Parameters:
urlstr - URL
headers - Headers to be added to the request header.
params - Parameters to be added to the request body.
httpsTrustStore - The trust store to use. If a HTTPS connection is required and this is set to NULL, the default trust store specified in the override configs will be used.
basicAuthUsername - Basic-auth username. If null, basic-auth will be disabled.
basicAuthPassword - Basic-auth password. If null, basic-auth will be disabled.
clientKeyStore - Client key store. If null, client cert auth will be disabled.
clientKeyAlias - Client key alias. If null, client cert auth will be disabled.
Returns:
The HTTP response. Null if invalid URL or no response.

httpPut

public static HttpResponse httpPut(java.lang.String urlstr,
                                   Headers headers,
                                   Parameters params,
                                   java.lang.String httpsTrustStore,
                                   java.lang.String basicAuthUsername,
                                   java.lang.String basicAuthPassword,
                                   java.lang.String clientKeyStore,
                                   java.lang.String clientKeyAlias,
                                   java.lang.String protocol)
HTTP client PUT method.

Parameters:
urlstr - URL
headers - Headers to be added to the request header.
params - Parameters to be added to the request body.
httpsTrustStore - The trust store to use. If a HTTPS connection is required and this is set to NULL, the default trust store specified in the override configs will be used.
basicAuthUsername - Basic-auth username. If null, basic-auth will be disabled.
basicAuthPassword - Basic-auth password. If null, basic-auth will be disabled.
clientKeyStore - Client key store. If null, client cert auth will be disabled.
clientKeyAlias - Client key alias. If null, client cert auth will be disabled.
Returns:
The HTTP response. Null if invalid URL or no response.