org.opends.server.protocols.internal
Class InternalMozillaLDAPSocketFactory

java.lang.Object
  extended by org.opends.server.protocols.internal.InternalMozillaLDAPSocketFactory
All Implemented Interfaces:
netscape.ldap.LDAPSocketFactory

public final class InternalMozillaLDAPSocketFactory
extends java.lang.Object
implements netscape.ldap.LDAPSocketFactory

This class provides an implementation of the {{netscape.ldap.LDAPSocketFactory}} class that can be used to allow the Mozilla LDAP SDK for Java to perform internal operations in OpenDS. To use it, simply provide an instance of this class to the constructor of the {{netscape.ldap.LDAPConnection}} class, like:

 LDAPConnection conn =
      new LDAPConnection(new InternalMozillaLDAPSocketFactory());
 


Constructor Summary
InternalMozillaLDAPSocketFactory()
          Creates a new instance of this internal Mozilla LDAP socket factory.
 
Method Summary
 java.net.Socket makeSocket(java.lang.String host, int port)
          Creates and returns a new internal LDAP socket, which can be used by the Mozilla LDAP SDK for Java to perform internal operations in OpenDS.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalMozillaLDAPSocketFactory

public InternalMozillaLDAPSocketFactory()
Creates a new instance of this internal Mozilla LDAP socket factory.

Method Detail

makeSocket

public java.net.Socket makeSocket(java.lang.String host,
                                  int port)
Creates and returns a new internal LDAP socket, which can be used by the Mozilla LDAP SDK for Java to perform internal operations in OpenDS.

Specified by:
makeSocket in interface netscape.ldap.LDAPSocketFactory
Parameters:
host - The address of the server to which the connection should be established. This will be ignored, since there will not be any actual network communication.
port - The port of the server to which the connection should be established. This will be ignored, since there will not be any actual network communication.
Returns:
An internal LDAP socket, which can be used by the Mozilla LDAP SDK for Java to perform internal operations in OpenDS.