Class CustomSocketFactory
java.lang.Object
javax.net.SocketFactory
com.sun.enterprise.security.auth.realm.ldap.CustomSocketFactory
- All Implemented Interfaces:
Comparator<SocketFactory>
Custom socket factory for ldaps (SSL).
The comparator only works in JDK 1.6 onwards. Due to a bug in JDK 1.6 compare method invocation fails with a classcast
exception. The caller is trying to pass java.lang.String when it should have passed javax.net.SocketFactory
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
compare
(SocketFactory s1, SocketFactory s2) 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
-
Field Details
-
SSL
- See Also:
-
_logger
-
sm
protected static final com.sun.enterprise.util.i18n.StringManager sm
-
-
Constructor Details
-
CustomSocketFactory
public CustomSocketFactory()
-
-
Method Details
-
createSocket
- Overrides:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
UnknownHostException
-
createSocket
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException, UnknownHostException - Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
UnknownHostException
-
createSocket
public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException - Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
compare
- Specified by:
compare
in interfaceComparator<SocketFactory>
-
getDefault
-