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

neil_a_wilson
13.55.2006 fa6e5bb0c17c4d59d8598979feb1a7701bc32679
opends/src/server/org/opends/server/protocols/jmx/JmxConnectionHandler.java
@@ -61,6 +61,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;
@@ -170,6 +171,21 @@
    new LinkedList<ConfigAttribute>();
  /**
   * The unique name for this connection handler.
   */
  protected String connectionHandlerName;
  /**
   * The protocol used to communicate with clients.
   */
  protected String protocol;
  /**
   * The set of listeners for this connection handler.
   */
  protected LinkedList<HostPort> listeners = new LinkedList<HostPort>();
  /**
   * The list of active client connection.
   */
  protected LinkedList<ClientConnection> connectionList =
@@ -493,6 +509,19 @@
      String message = getMessage(msgID, String.valueOf(configEntryDN), "");
      throw new InitializationException(msgID, message);
    }
    if (useSSL)
    {
      protocol = "JMX+SSL";
    }
    else
    {
      protocol = "JMX";
    }
    listeners.clear();
    listeners.add(new HostPort("0.0.0.0", listenPort));
    connectionHandlerName = "JMX Connection Handler "+ listenPort;
  }
  /**
@@ -518,6 +547,36 @@
  }
  /**
   * {@inheritDoc}
   */
  public String getConnectionHandlerName()
  {
    assert debugEnter(CLASS_NAME, "getConnectionHandlerName");
    return connectionHandlerName;
  }
  /**
   * {@inheritDoc}
   */
  public String getProtocol()
  {
    assert debugEnter(CLASS_NAME, "getProtocol");
    return protocol;
  }
  /**
   * {@inheritDoc}
   */
  public Collection<HostPort> getListeners()
  {
    assert debugEnter(CLASS_NAME, "getListeners");
    return listeners;
  }
  /**
   * Retrieves the set of active client connections that have been
   * established through this connection handler.
   *
@@ -842,6 +901,18 @@
      }
    }
    if (useSSL)
    {
      protocol = "JMX+SSL";
    }
    else
    {
      protocol = "JMX";
    }
    listeners.clear();
    listeners.add(new HostPort(listenPort));
    //
    // Start the new RMI Connector
    rmiConnector.initialize();