public final class DelegatingSSLSocketFactory extends SSLSocketFactory
SSLSocketFactory
that can delegate to various SSL implementations.
Specifically, either OpenSSL or JSSE can be used. OpenSSL offers better
performance than JSSE and is made available via the
wildlfy-openssl
library.
The factory has several different modes of operation:
Modifier and Type | Class and Description |
---|---|
static class |
DelegatingSSLSocketFactory.SSLChannelMode
Default indicates Ordered, preferred OpenSSL, if failed to load then fall
back to Default_JSSE.
|
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket() |
Socket |
createSocket(InetAddress host,
int port) |
Socket |
createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort) |
Socket |
createSocket(Socket s,
String host,
int port,
boolean autoClose) |
Socket |
createSocket(String host,
int port) |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int localPort) |
DelegatingSSLSocketFactory.SSLChannelMode |
getChannelMode()
Get the channel mode of this instance.
|
String[] |
getDefaultCipherSuites() |
static DelegatingSSLSocketFactory |
getDefaultFactory()
Singleton instance of the SSLSocketFactory.
|
String |
getProviderName() |
String[] |
getSupportedCipherSuites() |
static void |
initializeDefaultFactory(DelegatingSSLSocketFactory.SSLChannelMode preferredMode)
Initialize a singleton SSL socket factory.
|
static void |
resetDefaultFactory()
For testing only: reset the socket factory.
|
createSocket, getDefault
public static void initializeDefaultFactory(DelegatingSSLSocketFactory.SSLChannelMode preferredMode) throws IOException
preferredMode
- applicable only if the instance is not initialized.IOException
- if an error occurs.public static void resetDefaultFactory()
public static DelegatingSSLSocketFactory getDefaultFactory()
public String getProviderName()
public String[] getDefaultCipherSuites()
getDefaultCipherSuites
in class SSLSocketFactory
public String[] getSupportedCipherSuites()
getSupportedCipherSuites
in class SSLSocketFactory
public DelegatingSSLSocketFactory.SSLChannelMode getChannelMode()
public Socket createSocket() throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException
createSocket
in class SSLSocketFactory
IOException
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(InetAddress host, int port) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(String host, int port) throws IOException
createSocket
in class SocketFactory
IOException
Copyright © 2008–2020 Apache Software Foundation. All rights reserved.