com.sap.core.connectivity.api.ldap

## Class LdapOnPremiseSocketFactory

- java.lang.Object
- - javax.net.SocketFactory
  - - com.sap.core.connectivity.api.ldap.LdapOnPremiseSocketFactory

-     public class LdapOnPremiseSocketFactory
      extends SocketFactory

  Socket factory capable of creating sockets to LDAP on premise systems.
  Class name of this socket factory can be specified as a value of property `java.naming.ldap.factory.socket` when establishing `LdapContext`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LdapOnPremiseSocketFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Socket` | `createSocket(InetAddress host, int port)`
    `Socket` | `createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)`
    `Socket` | `createSocket(String host, int port)`
    `Socket` | `createSocket(String host, int port, InetAddress localHost, int localPort)`
    `static SocketFactory` | `getDefault()` Returns the default LDAP on premise socket factory.
    `protected void` | `setConnectivitySocketFactory(ConnectivitySocketFactory factory)`

    - ### 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`

- - ### Constructor Detail

    - #### LdapOnPremiseSocketFactory

          public LdapOnPremiseSocketFactory()

  - ### Method Detail

    - #### setConnectivitySocketFactory

          protected void setConnectivitySocketFactory(ConnectivitySocketFactory factory)

    - #### getDefault

          public static SocketFactory getDefault()

      Returns the default LDAP on premise socket factory.
      Returns:
        instance of this class

    - #### createSocket

          public Socket createSocket(String host,
                            int port)
                              throws IOException,
                                     UnknownHostException

      Specified by:
        `createSocket` in class `SocketFactory`
      Throws:
        `IOException`
        `UnknownHostException`

    - #### createSocket

          public Socket createSocket(String host,
                            int port,
                            InetAddress localHost,
                            int localPort)
                              throws IOException,
                                     UnknownHostException

      Specified by:
        `createSocket` in class `SocketFactory`
      Throws:
        `IOException`
        `UnknownHostException`

    - #### 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`

Copyright © 2020 SAP. All Rights Reserved.