Package org.apache.hadoop.security
Class LdapGroupsMapping.LdapSslSocketFactory
java.lang.Object
javax.net.SocketFactory
org.apache.hadoop.security.LdapGroupsMapping.LdapSslSocketFactory
- Enclosing class:
- LdapGroupsMapping
An private internal socket factory used to create SSL sockets with custom
configuration. There is no way to pass a specific instance of a factory to
the Java naming services, and the instantiated socket factory is not
passed any contextual information, so all information must be encapsulated
directly in the class. Static fields are used here to achieve this. This is
safe since the only usage of
LdapGroupsMapping is within
Groups, which is a singleton (see the GROUPS field).
This has nearly the same behavior as an SSLSocketFactory. The only
additional logic is to configure the key store and trust store.
This is public only to be accessible by the Java naming services.
-
Method Summary
Modifier and TypeMethodDescriptioncreateSocket(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
-
Method Details
-
getDefault
-
createSocket
- Overrides:
createSocketin classSocketFactory- Throws:
IOException
-
createSocket
- 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
- 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
-