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 TypeMethodDescriptionintAs 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 SocketFactoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
- Specified by:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
- Specified by:
createSocketin classSocketFactory- Throws:
IOExceptionUnknownHostException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException - Specified by:
createSocketin classSocketFactory- Throws:
IOExceptionUnknownHostException
-
createSocket
- Overrides:
createSocketin classSocketFactory- Throws:
IOException
-
compare
As per Pooling Custom Socket Factory Connections, support comparing socket factories. We need to compareStringinstances (the factory class name) rather thanSocketFactorydue to a bug in Java; see Pooling LDAP connections with custom socket factory - Stack Overflow.- Specified by:
comparein interfaceComparator<String>
-