Class LdapHostnameVerificationSSLSocketFactory
java.lang.Object
javax.net.SocketFactory
com.atlassian.crowd.directory.ssl.LdapHostnameVerificationSSLSocketFactory
- All Implemented Interfaces:
Comparator<String>
public class LdapHostnameVerificationSSLSocketFactory
extends SocketFactory
implements Comparator<String>
This SocketFactory needs to call
SSLParameters.setEndpointIdentificationAlgorithm(String)
to enable LDAPS hostname
verification.
-
Method Summary
Modifier and TypeMethodDescriptionint
As per Pooling Custom Socket Factory Connections, support comparing socket factories.createSocket
(String host, int port) createSocket
(String host, int port, InetAddress localHost, int localPort) createSocket
(InetAddress host, int port) createSocket
(InetAddress address, int port, InetAddress localAddress, int localPort) static SocketFactory
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Method Details
-
getDefault
-
createSocket
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException - Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
UnknownHostException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException - Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
UnknownHostException
-
createSocket
- Overrides:
createSocket
in classSocketFactory
- Throws:
IOException
-
compare
As per Pooling Custom Socket Factory Connections, support comparing socket factories. We need to compareString
instances (the factory class name) rather thanSocketFactory
due to a bug in Java; see Pooling LDAP connections with custom socket factory - Stack Overflow.- Specified by:
compare
in interfaceComparator<String>
-