Class RequestParameters
- java.lang.Object
-
- com.ibm.security.access.httpclient.RequestParameters
-
public class RequestParameters extends java.lang.ObjectThis class stores the parameter values for a HTTP request.
-
-
Constructor Summary
Constructors Constructor Description RequestParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetBasicAuthPassword()Retrieve the value for the basic authentication password.java.lang.StringgetBasicAuthUsername()Retrieve the value for the basic authentication username.java.lang.StringgetClientKeyAlias()Retrieve the value for the client certificate alias.java.lang.StringgetClientKeyStore()Retrieve the value for the client certificate keystore.HeadersgetHeaders()Retrieve the value for the request headers.ParametersgetParameters()Retrieve the value for the parameters.java.lang.StringgetProtocol()Retrieve the value for the request protocol.java.lang.StringgetProxyServer()Retrieve the value for the proxy server.intgetTimeout()Retrieve the value for the connection timeout in milliseconds.java.lang.StringgetTrustStore()Retrieve the value for the HTTPS truststore.java.lang.StringgetUrlString()Retrieve the value for the URL String.booleanisSendDataAsJson()Retrieve the value of the send data as json flag.booleanisThrowExec()Retrieve the value for throw exception on error.voidsetBasicAuthPassword(java.lang.String basicAuthPassword)Set the value for the basic authentication password.voidsetBasicAuthUsername(java.lang.String basicAuthUsername)Set the value for the basic authentication username.voidsetClientKeyAlias(java.lang.String clientKeyAlias)Set the value for the client certificate alias.voidsetClientKeyStore(java.lang.String clientKeyStore)Set the value for the client certificate keystore.voidsetHeaders(Headers headers)Set the value for the request headers.voidsetParameters(Parameters params)Set the value for the parameters.voidsetProtocol(java.lang.String protocol)Set the value for the request protocol.voidsetProxyServer(java.lang.String proxyServer)Set the value for the proxy server.voidsetSendDataAsJson(boolean sendDataAsJson)Set the value for the send data as json flag.voidsetThrowExec(boolean throwExec)Set the value for throw exception on error.voidsetTimeout(int timeout)Set the value for the connection timeout in seconds.voidsetTrustStore(java.lang.String trustStore)Set the value for the HTTPS truststore.voidsetUrlString(java.lang.String urlString)Set the value for the URL String.
-
-
-
Method Detail
-
getUrlString
public java.lang.String getUrlString()
Retrieve the value for the URL String.- Returns:
- String
-
setUrlString
public void setUrlString(java.lang.String urlString)
Set the value for the URL String. This is a mandatory parameter.- Parameters:
urlString-
-
getHeaders
public Headers getHeaders()
Retrieve the value for the request headers.- Returns:
- Headers
-
setHeaders
public void setHeaders(Headers headers)
Set the value for the request headers.- Parameters:
headers-
-
getTrustStore
public java.lang.String getTrustStore()
Retrieve the value for the HTTPS truststore.- Returns:
- String
-
setTrustStore
public void setTrustStore(java.lang.String trustStore)
Set the value for the HTTPS truststore. If not set the truststore name will be set as the advanced configuration property util.httpClientv2.defaultTrustStore.- Parameters:
trustStore-
-
getBasicAuthUsername
public java.lang.String getBasicAuthUsername()
Retrieve the value for the basic authentication username.- Returns:
- String
-
setBasicAuthUsername
public void setBasicAuthUsername(java.lang.String basicAuthUsername)
Set the value for the basic authentication username. If not set, basic-auth will be disabled.- Parameters:
basicAuthUsername-
-
getBasicAuthPassword
public java.lang.String getBasicAuthPassword()
Retrieve the value for the basic authentication password.- Returns:
- String
-
setBasicAuthPassword
public void setBasicAuthPassword(java.lang.String basicAuthPassword)
Set the value for the basic authentication password. If not set, basic-auth will be disabled.- Parameters:
basicAuthPassword-
-
getClientKeyStore
public java.lang.String getClientKeyStore()
Retrieve the value for the client certificate keystore.- Returns:
- String
-
setClientKeyStore
public void setClientKeyStore(java.lang.String clientKeyStore)
Set the value for the client certificate keystore. If not set, client certificate authentication will be disabled.- Parameters:
clientKeyStore-
-
getClientKeyAlias
public java.lang.String getClientKeyAlias()
Retrieve the value for the client certificate alias.- Returns:
- String
-
setClientKeyAlias
public void setClientKeyAlias(java.lang.String clientKeyAlias)
Set the value for the client certificate alias. If not set, client certificate authentication will be disabled.- Parameters:
clientKeyAlias-
-
getProtocol
public java.lang.String getProtocol()
Retrieve the value for the request protocol.- Returns:
- String
-
setProtocol
public void setProtocol(java.lang.String protocol)
Set the value for the request protocol. If not set the protocol will be set as the advanced configuration property util.httpClientv2.defaultSSLProtocol.- Parameters:
protocol-
-
isThrowExec
public boolean isThrowExec()
Retrieve the value for throw exception on error.- Returns:
- boolean
-
setThrowExec
public void setThrowExec(boolean throwExec)
Set the value for throw exception on error. If not set a default value of false will be used.- Parameters:
throwExec-
-
getTimeout
public int getTimeout()
Retrieve the value for the connection timeout in milliseconds.- Returns:
- int
-
setTimeout
public void setTimeout(int timeout)
Set the value for the connection timeout in seconds. A value of 0 will result in no connection timeout. If not set or set to a value less than 0 the timeout will be set as the advanced configuration property util.httpClientv2.connectTimeout.- Parameters:
timeout-
-
getProxyServer
public java.lang.String getProxyServer()
Retrieve the value for the proxy server. Example: https://myproxy.com:443- Returns:
- String
-
setProxyServer
public void setProxyServer(java.lang.String proxyServer)
Set the value for the proxy server. Example: https://myproxy.com:443 If not set the proxy will be set from the advanced configuration properties: util.httpClientv2.proxyProtocol util.httpClientv2.proxyHost util.httpClientv2.proxyPort If these are also not set then no proxy will be used.- Parameters:
proxyServer-
-
getParameters
public Parameters getParameters()
Retrieve the value for the parameters.- Returns:
- Parameters
-
setParameters
public void setParameters(Parameters params)
Set the value for the parameters. This is the POST, PUT or PATCH data that will be sent with the request.- Parameters:
params-
-
isSendDataAsJson
public boolean isSendDataAsJson()
Retrieve the value of the send data as json flag.- Returns:
- boolean
-
setSendDataAsJson
public void setSendDataAsJson(boolean sendDataAsJson)
Set the value for the send data as json flag. If set to true the data will be sent json formatted. This value will default to false if not explicitly set.- Parameters:
sendDataAsJson-
-
-