public class SslConfig extends Object
An instance of this class may be added as a property of the ClientConfig
using ClientProperties.SSL_CONFIG.
| Constructor and Description |
|---|
SslConfig()
Create SSL configuration with no
HostnameVerifier
and a default SSLContext constructed using SSLContext.getInstance("SSL"). |
SslConfig(HostnameVerifier verifier)
Create SSL configuration with a
HostnameVerifier and a default SSLContext
constructed using SSLContext.getInstance("SSL"). |
SslConfig(HostnameVerifier verifier,
SSLContext context)
Create SSL configuration with a
HostnameVerifier and a SSLContext. |
SslConfig(SSLContext context)
Create SSL configuration with no
HostnameVerifier and a specified
SSLContext. |
| Modifier and Type | Method and Description |
|---|---|
HostnameVerifier |
getHostnameVerifier()
Get the
hostname verifier. |
SSLContext |
getSSLContext()
Get the
SSLContext. |
boolean |
isHostnameVerifierSet()
Check if a
hostname verifier is configured in this SSL config. |
public SslConfig()
throws NoSuchAlgorithmException
HostnameVerifier
and a default SSLContext constructed using SSLContext.getInstance("SSL").NoSuchAlgorithmException - if the SSLContext could not be created.public SslConfig(HostnameVerifier verifier) throws NoSuchAlgorithmException
HostnameVerifier and a default SSLContext
constructed using SSLContext.getInstance("SSL").verifier - the HostnameVerifier.NoSuchAlgorithmException - if the SSLContext could not be created.public SslConfig(HostnameVerifier verifier, SSLContext context)
HostnameVerifier and a SSLContext.verifier - the hostname verifier.context - the SSL context. Must not be null.public SslConfig(SSLContext context)
HostnameVerifier and a specified
SSLContext.context - the SSL context. Must not be null.public boolean isHostnameVerifierSet()
hostname verifier is configured in this SSL config.true if a hostname verifier is configured, false otherwise.public HostnameVerifier getHostnameVerifier()
hostname verifier.null if not set.public SSLContext getSSLContext()
SSLContext.null.Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.