Class CustomSocketFactory
- java.lang.Object
-
- javax.net.SocketFactory
-
- com.sun.enterprise.security.auth.realm.ldap.CustomSocketFactory
-
- All Implemented Interfaces:
Comparator<SocketFactory>
public class CustomSocketFactory extends SocketFactory implements 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:
LDAPRealm
-
-
Constructor Summary
Constructors Constructor Description CustomSocketFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(SocketFactory s1, SocketFactory s2)
Socket
createSocket(String arg0, int arg1)
Socket
createSocket(String arg0, int arg1, InetAddress arg2, int arg3)
Socket
createSocket(InetAddress arg0, int arg1)
Socket
createSocket(InetAddress arg0, int arg1, InetAddress arg2, int arg3)
static SocketFactory
getDefault()
-
Methods inherited from class javax.net.SocketFactory
createSocket
-
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 Detail
-
SSL
public static final String SSL
- See Also:
- Constant Field Values
-
LOGGER
protected static final Logger LOGGER
-
sm
protected static final StringManager sm
-
-
Method Detail
-
createSocket
public Socket createSocket(String arg0, int arg1) throws IOException, UnknownHostException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
UnknownHostException
- See Also:
SocketFactory.createSocket(java.lang.String, int)
-
createSocket
public Socket createSocket(InetAddress arg0, int arg1) throws IOException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
- See Also:
SocketFactory.createSocket(java.net.InetAddress, int)
-
createSocket
public Socket createSocket(String arg0, int arg1, InetAddress arg2, int arg3) throws IOException, UnknownHostException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
UnknownHostException
- See Also:
SocketFactory.createSocket(java.lang.String, int, java.net.InetAddress, int)
-
createSocket
public Socket createSocket(InetAddress arg0, int arg1, InetAddress arg2, int arg3) throws IOException
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
- See Also:
SocketFactory.createSocket(java.net.InetAddress, int, java.net.InetAddress, int)
-
compare
public int compare(SocketFactory s1, SocketFactory s2)
- Specified by:
compare
in interfaceComparator<SocketFactory>
-
getDefault
public static SocketFactory getDefault()
-
-