Package com.nimbusds.common.config
Class WebServiceDetails
- java.lang.Object
-
- com.nimbusds.common.config.WebServiceDetails
-
- All Implemented Interfaces:
LoggableConfiguration
- Direct Known Subclasses:
Json2LdapDetails
public class WebServiceDetails extends Object implements LoggableConfiguration
Web service connect details.The configuration is stored as public fields which become immutable (final) after their initialisation.
Property keys: [prefix]*
-
-
Field Summary
Fields Modifier and Type Field Description String
apiKey
Optional API key to include with requests to the web service,null
if none.int
connectTimeout
Specifies an HTTP connect timeout for web service requests, in milliseconds.static int
DEFAULT_CONNECT_TIMEOUT
The default HTTP connect timeout for web service requests (disabled).static int
DEFAULT_READ_TIMEOUT
The default HTTP read timeout for web service requests (disabled).static boolean
DEFAULT_SELF_SIGNED_CERT_TRUST
The default self-signed certificate policy.int
readTimeout
Specifies an HTTP read timeout for web service requests, in milliseconds.boolean
trustSelfSignedCerts
Specifies whether to accept self-signed X.509 certificates presented by the web service (for HTTPS connections).URL
url
The HTTP(S) URL of the web service.-
Fields inherited from interface com.nimbusds.common.config.LoggableConfiguration
LOG_CATEGORY
-
-
Constructor Summary
Constructors Constructor Description WebServiceDetails(String prefix, Properties props)
Creates a new web service details instance from the specified properties.
-
-
-
Field Detail
-
trustSelfSignedCerts
public final boolean trustSelfSignedCerts
Specifies whether to accept self-signed X.509 certificates presented by the web service (for HTTPS connections).Property key: [prefix]trustSelfSignedCerts
-
DEFAULT_SELF_SIGNED_CERT_TRUST
public static final boolean DEFAULT_SELF_SIGNED_CERT_TRUST
The default self-signed certificate policy.- See Also:
- Constant Field Values
-
connectTimeout
public final int connectTimeout
Specifies an HTTP connect timeout for web service requests, in milliseconds. Zero implies the option is disabled (timeout of infinity).Property key: [prefix]connectTimeout
-
DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_CONNECT_TIMEOUT
The default HTTP connect timeout for web service requests (disabled).- See Also:
- Constant Field Values
-
readTimeout
public final int readTimeout
Specifies an HTTP read timeout for web service requests, in milliseconds. Zero implies the option is disabled (timeout of infinity).Property key: [prefix]readTimeout
-
DEFAULT_READ_TIMEOUT
public static final int DEFAULT_READ_TIMEOUT
The default HTTP read timeout for web service requests (disabled).- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebServiceDetails
public WebServiceDetails(String prefix, Properties props) throws com.thetransactioncompany.util.PropertyParseException
Creates a new web service details instance from the specified properties.Mandatory properties:
- [prefix]url
Optional properties, with defaults:
- [prefix]trustSelfSignedCerts = false
- [prefix]connectTimeout = 0
- [prefix]readTimeout = 0
- [prefix]apiKey = null
- Parameters:
prefix
- The properties prefix. Must not benull
.props
- The properties. Must not benull
.- Throws:
com.thetransactioncompany.util.PropertyParseException
- On a missing or invalid property.
-
-
Method Detail
-
log
public void log()
Logs the configuration details at INFO level.- Specified by:
log
in interfaceLoggableConfiguration
-
-