LdapGroupsMapping.LdapSslSocketFactory (Apache Hadoop Common 3.5.0 API)
Description: declaration: package: org.apache.hadoop.security, class: LdapGroupsMapping, class: LdapSslSocketFactory

Package org.apache.hadoop.security

# Class LdapGroupsMapping.LdapSslSocketFactory

java.lang.Object
javax.net.SocketFactory
org.apache.hadoop.security.LdapGroupsMapping.LdapSslSocketFactory

Enclosing class:
  LdapGroupsMapping

@Private public static class LdapGroupsMapping.LdapSslSocketFactory extends SocketFactory
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 Type
  Method
  Description
  `Socket`
  `createSocket()`
  `Socket`
  `createSocket(String host, int port)`
  `Socket`
  `createSocket(String host, int port, InetAddress localHost, int localPort)`
  `Socket`
  `createSocket(InetAddress host, int port)`
  `Socket`
  `createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)`
  `static SocketFactory`
  `getDefault()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getDefault

    public static SocketFactory getDefault()

  - ### createSocket

    public Socket createSocket() throws IOException
    Overrides:
      `createSocket` in class `SocketFactory`
    Throws:
      `IOException`

  - ### createSocket

    public Socket createSocket(String host, int port) throws IOException
    Specified by:
      `createSocket` in class `SocketFactory`
    Throws:
      `IOException`

  - ### createSocket

    public Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException
    Specified by:
      `createSocket` in class `SocketFactory`
    Throws:
      `IOException`

  - ### createSocket

    public Socket createSocket(InetAddress host, int port) throws IOException
    Specified by:
      `createSocket` in class `SocketFactory`
    Throws:
      `IOException`

  - ### createSocket

    public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
    Specified by:
      `createSocket` in class `SocketFactory`
    Throws:
      `IOException`