public class WebServiceDetails extends Object implements LoggableConfiguration
The configuration is stored as public fields which become immutable (final) after their initialisation.
Property keys: [prefix]*
Modifier and Type | Field and 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.
|
LOG_CATEGORY
Constructor and Description |
---|
WebServiceDetails(String prefix,
Properties props)
Creates a new web service details instance from the specified
properties.
|
public final boolean trustSelfSignedCerts
Property key: [prefix]trustSelfSignedCerts
public static final boolean DEFAULT_SELF_SIGNED_CERT_TRUST
public final int connectTimeout
Property key: [prefix]connectTimeout
public static final int DEFAULT_CONNECT_TIMEOUT
public final int readTimeout
Property key: [prefix]readTimeout
public static final int DEFAULT_READ_TIMEOUT
public WebServiceDetails(String prefix, Properties props) throws com.thetransactioncompany.util.PropertyParseException
Mandatory properties:
Optional properties, with defaults:
prefix
- The properties prefix. Must not be null
.props
- The properties. Must not be null
.com.thetransactioncompany.util.PropertyParseException
- On a missing or invalid property.public void log()
log
in interface LoggableConfiguration
Copyright © 2015 Connect2id. All Rights Reserved.