mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
13.55.2006 fa6e5bb0c17c4d59d8598979feb1a7701bc32679
opends/src/server/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
@@ -69,6 +69,7 @@
import org.opends.server.types.DN;
import org.opends.server.types.ErrorLogCategory;
import org.opends.server.types.ErrorLogSeverity;
import org.opends.server.types.HostPort;
import org.opends.server.types.InitializationException;
import org.opends.server.types.ResultCode;
import org.opends.server.types.SSLClientAuthPolicy;
@@ -206,6 +207,9 @@
  // accepted by the server.
  private int requestHandlerIndex;
  // The set of listeners for this connection handler.
  private LinkedList<HostPort> listeners;
  // The set of request handlers that are associated with this connection
  // handler.
  private LDAPRequestHandler[] requestHandlers;
@@ -223,6 +227,9 @@
  // The unique name assigned to this connection handler.
  private String handlerName;
  // The protocol used by this connection handler.
  private String protocol;
  // The security mechanism used for connections accepted by this connection
  // handler.
  private String securityMechanism;
@@ -996,11 +1003,14 @@
    }
    // Construct a unique name for this connection handler.
    // Construct a unique name for this connection handler, and put together the
    // set of listeners.
    listeners = new LinkedList<HostPort>();
    StringBuilder nameBuffer = new StringBuilder();
    nameBuffer.append("LDAP Connection Handler");
    for (InetAddress a : listenAddresses)
    {
      listeners.add(new HostPort(a.getHostAddress(), listenPort));
      nameBuffer.append(" ");
      nameBuffer.append(a.getHostAddress());
    }
@@ -1013,16 +1023,18 @@
    if (useSSL)
    {
      securityMechanism = SECURITY_MECHANISM_SSL;
      protocol          = "LDAP+SSL";
    }
    else
    {
      securityMechanism = null;
      protocol          = "LDAP";
    }
    // Perform any additional initialization that might be required.
    connHandlerThread = null;
    statTracker = new LDAPStatistics(handlerName);
    statTracker = new LDAPStatistics(handlerName + " Statistics");
    // Create and start the request handlers.
@@ -1091,6 +1103,42 @@
  /**
   * {@inheritDoc}
   */
  public String getConnectionHandlerName()
  {
    assert debugEnter(CLASS_NAME, "getConnectionHandlerName");
    return handlerName;
  }
  /**
   * {@inheritDoc}
   */
  public String getProtocol()
  {
    assert debugEnter(CLASS_NAME, "getProtocol");
    return protocol;
  }
  /**
   * {@inheritDoc}
   */
  public Collection<HostPort> getListeners()
  {
    assert debugEnter(CLASS_NAME, "getProtocol");
    return listeners;
  }
  /**
   * Retrieves the set of active client connections that have been established
   * through this connection handler.
   *
@@ -1114,6 +1162,22 @@
  /**
   * Retrieves the port on which this connection handler is listening
   * for client connections.
   *
   * @return  The port on which this connection handler is listening
   *          for client connections.
   */
  public int getListenPort()
  {
    assert debugEnter(CLASS_NAME, "getListenPort");
    return listenPort;
  }
  /**
   * Operates in a loop, accepting new connections and ensuring that requests on
   * those connections are handled properly.
   */
@@ -3013,7 +3077,7 @@
        {
          if (statTracker == null)
          {
            statTracker = new LDAPStatistics(handlerName);
            statTracker = new LDAPStatistics(handlerName + " Statistics");
          }
          else
          {