public class MailSSLSocketFactory extends SSLSocketFactory
An instance of this factory can be set as the value of the
mail.<protocol>.ssl.socketFactory property.
| Constructor and Description |
|---|
MailSSLSocketFactory()
Initializes a new MailSSLSocketFactory.
|
MailSSLSocketFactory(String protocol)
Initializes a new MailSSLSocketFactory with a given protocol.
|
createSocket, getDefaultpublic MailSSLSocketFactory()
throws GeneralSecurityException
GeneralSecurityException - for security errorspublic MailSSLSocketFactory(String protocol) throws GeneralSecurityException
protocol - The protocol to useNoSuchAlgorithmException - if given protocol is not supportedGeneralSecurityException - for security errorspublic KeyManager[] getKeyManagers()
public void setKeyManagers(KeyManager[] keyManagers) throws GeneralSecurityException
keyManagers - the keyManagers to setGeneralSecurityException - for security errorspublic SecureRandom getSecureRandom()
public void setSecureRandom(SecureRandom secureRandom) throws GeneralSecurityException
secureRandom - the secureRandom to setGeneralSecurityException - for security errorspublic TrustManager[] getTrustManagers()
public void setTrustManagers(TrustManager[] trustManagers) throws GeneralSecurityException
trustManagers - the trustManagers to setGeneralSecurityException - for security errorspublic boolean isTrustAllHosts()
public void setTrustAllHosts(boolean trustAllHosts)
trustAllHosts - should all hosts be trusted?public String[] getTrustedHosts()
public void setTrustedHosts(String[] trustedHosts)
trustedHosts - the hosts to trustpublic boolean isServerTrusted(String server, SSLSocket sslSocket)
server - name of the server we connected tosslSocket - SSLSocket connected to the serverpublic Socket createSocket(Socket socket, String s, int i, boolean flag) throws IOException
createSocket in class SSLSocketFactoryIOExceptionpublic String[] getDefaultCipherSuites()
getDefaultCipherSuites in class SSLSocketFactorypublic String[] getSupportedCipherSuites()
getSupportedCipherSuites in class SSLSocketFactorypublic Socket createSocket() throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(InetAddress inetaddress, int i, InetAddress inetaddress1, int j) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(InetAddress inetaddress, int i) throws IOException
createSocket in class SocketFactoryIOExceptionpublic Socket createSocket(String s, int i, InetAddress inetaddress, int j) throws IOException, UnknownHostException
createSocket in class SocketFactoryIOExceptionUnknownHostExceptionpublic Socket createSocket(String s, int i) throws IOException, UnknownHostException
createSocket in class SocketFactoryIOExceptionUnknownHostExceptionCopyright © 2017 JBoss by Red Hat. All rights reserved.