public class SavingSSLSocketFactory extends SSLSocketFactory
SSLSocketFactory
subclass that takes care of using
InstallCert.SavingTrustManager
as X509TrustManager
subclass to collect server certificates and allows creating unconnected
sockets, as required by JavaMail protocol handlers. This class is made public
in order to allow being configured as the factory to be used by JavaMail
properties mechanism, etc.Modifier and Type | Field and Description |
---|---|
(package private) SSLSocketFactory |
factory |
Constructor and Description |
---|
SavingSSLSocketFactory() |
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket()
Bypass the default
javax.net.SocketFactory implementation
that throws java.net.SocketException with nested
java.lang.UnsupportedOperationException with "Unconnected
sockets not implemented" message. |
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) |
String[] |
getDefaultCipherSuites() |
String[] |
getSupportedCipherSuites() |
getDefault
SSLSocketFactory factory
public Socket createSocket(Socket s, String host, int port, boolean autoClose) throws IOException
createSocket
in class SSLSocketFactory
IOException
public String[] getDefaultCipherSuites()
getDefaultCipherSuites
in class SSLSocketFactory
public String[] getSupportedCipherSuites()
getSupportedCipherSuites
in class SSLSocketFactory
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, 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, InetAddress localHost, int localPort) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket(String host, int port) throws IOException
createSocket
in class SocketFactory
IOException
public Socket createSocket() throws IOException
javax.net.SocketFactory
implementation
that throws java.net.SocketException
with nested
java.lang.UnsupportedOperationException
with "Unconnected
sockets not implemented" message.createSocket
in class SocketFactory
IOException