public class ThreadLocalTLSSocketFactory extends TLSSocketFactory
Modifier and Type | Class and Description |
---|---|
private static class |
ThreadLocalTLSSocketFactory.ThreadLocalSslConfig
Thread local class for
SslConfig . |
Modifier and Type | Field and Description |
---|---|
private static ThreadLocalTLSSocketFactory.ThreadLocalSslConfig |
THREAD_LOCAL_SSL_CONFIG
Thread local instance of the ssl config.
|
DEFAULT_PROTOCOL, factory, logger
Constructor and Description |
---|
ThreadLocalTLSSocketFactory() |
Modifier and Type | Method and Description |
---|---|
static SocketFactory |
getDefault()
This returns the default SSL socket factory.
|
static SSLSocketFactory |
getHostnameVerifierFactory(SslConfig config,
String[] names)
Returns an instance of this socket factory configured with a hostname verifying trust manager.
|
SslConfig |
getSslConfig()
Returns the SSL configuration used by this socket factory.
|
void |
removeSslConfig()
Removes the ssl config from the current thread-local value.
|
void |
setSslConfig(SslConfig config)
Sets the SSL configuration used by this socket factory.
|
String |
toString() |
addHostnameVerifyingTrustManager, createSSLContextInitializer, initialize
createSocket, createSocket, createSocket, createSocket, createSocket, createSocket, getDefaultCipherSuites, getFactory, getSocketConfig, getSupportedCipherSuites, initSSLSocket, setSocketConfig
createSocket
private static final ThreadLocalTLSSocketFactory.ThreadLocalSslConfig THREAD_LOCAL_SSL_CONFIG
public SslConfig getSslConfig()
AbstractTLSSocketFactory
getSslConfig
in class AbstractTLSSocketFactory
public void setSslConfig(SslConfig config)
AbstractTLSSocketFactory
setSslConfig
in class AbstractTLSSocketFactory
config
- ssl configpublic void removeSslConfig()
public static SocketFactory getDefault()
public static SSLSocketFactory getHostnameVerifierFactory(SslConfig config, String[] names)
HostnameVerifyingTrustManager
with DefaultHostnameVerifier
is set. See TLSSocketFactory.addHostnameVerifyingTrustManager(SslConfig, String[])
.config
- to set on the socket factorynames
- to use for hostname verificationpublic String toString()
toString
in class TLSSocketFactory
Copyright © 2003-2019 Virginia Tech. All Rights Reserved.