Package com.nimbusds.common.config
Class WebServiceDetails
java.lang.Object
com.nimbusds.common.config.WebServiceDetails
- All Implemented Interfaces:
LoggableConfiguration
- Direct Known Subclasses:
Json2LdapDetails
Web service connect details.
The configuration is stored as public fields which become immutable (final) after their initialisation.
Property keys: [prefix]*
-
Field Summary
Modifier and TypeFieldDescriptionfinal String
Optional API key to include with requests to the web service,null
if none.final int
Specifies an HTTP connect timeout for web service requests, in milliseconds.static final int
The default HTTP connect timeout for web service requests (disabled).static final int
The default HTTP read timeout for web service requests (disabled).static final boolean
The default self-signed certificate policy.final int
Specifies an HTTP read timeout for web service requests, in milliseconds.final boolean
Specifies whether to accept self-signed X.509 certificates presented by the web service (for HTTPS connections).final URL
The HTTP(S) URL of the web service.Fields inherited from interface com.nimbusds.common.config.LoggableConfiguration
LOG_CATEGORY
-
Constructor Summary
ConstructorDescriptionWebServiceDetails
(String prefix, Properties props) Creates a new web service details instance from the specified properties. -
Method Summary
-
Field Details
-
url
The HTTP(S) URL of the web service.Property key: [prefix]url
-
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
The default self-signed certificate policy.- See Also:
-
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
The default HTTP connect timeout for web service requests (disabled).- See Also:
-
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
The default HTTP read timeout for web service requests (disabled).- See Also:
-
apiKey
Optional API key to include with requests to the web service,null
if none.Property key: [prefix]apiKey
-
-
Constructor Details
-
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 Details
-
log
Logs the configuration details at INFO level.- Specified by:
log
in interfaceLoggableConfiguration
-