Class CustomSSLSocketFactory
- java.lang.Object
-
- javax.net.SocketFactory
-
- javax.net.ssl.SSLSocketFactory
-
- com.chutneytesting.security.infra.ldap.ssl.CustomSSLSocketFactory
-
public class CustomSSLSocketFactory extends SSLSocketFactory
-
-
Constructor Summary
Constructors Constructor Description CustomSSLSocketFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SocketcreateSocket(String host, int port)SocketcreateSocket(String host, int port, InetAddress localHost, int localPort)SocketcreateSocket(InetAddress host, int port)SocketcreateSocket(InetAddress address, int port, InetAddress localAddress, int localPort)SocketcreateSocket(Socket socket, String host, int port, boolean autoClose)static SocketFactorygetDefault()Returns the default SSL socket factory.String[]getDefaultCipherSuites()String[]getSupportedCipherSuites()-
Methods inherited from class javax.net.ssl.SSLSocketFactory
createSocket
-
Methods inherited from class javax.net.SocketFactory
createSocket
-
-
-
-
Method Detail
-
getDefault
public static SocketFactory getDefault()
Returns the default SSL socket factory.The first time this method is called, the security property "ssl.SocketFactory.provider" is examined. If it is non-null, a class by that name is loaded and instantiated. If that is successful and the object is an instance of SSLSocketFactory, it is made the default SSL socket factory.
Otherwise, this method returns
SSLContext.getDefault().getSocketFactory(). If that call fails, an inoperative factory is returned.- Returns:
- the default
SocketFactory - See Also:
SSLContext.getDefault()
-
getDefaultCipherSuites
public String[] getDefaultCipherSuites()
- Specified by:
getDefaultCipherSuitesin classSSLSocketFactory
-
getSupportedCipherSuites
public String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuitesin classSSLSocketFactory
-
createSocket
public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException
- Specified by:
createSocketin classSSLSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress host, int port) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
-