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

neil_a_wilson
01.34.2006 dc0b97516ea3c05cd6cc988a9120faecb0de675c
opends/src/server/org/opends/server/protocols/ldap/LDAPRequestHandler.java
@@ -39,6 +39,8 @@
import org.opends.server.api.ConnectionSecurityProvider;
import org.opends.server.api.DirectoryThread;
import org.opends.server.api.ServerShutdownListener;
import org.opends.server.core.DirectoryServer;
import org.opends.server.core.InitializationException;
import static org.opends.server.loggers.Debug.*;
@@ -61,6 +63,7 @@
 */
public class LDAPRequestHandler
       extends DirectoryThread
       implements ServerShutdownListener
{
  /**
   * The fully-qualified name of this class for debugging purposes.
@@ -423,6 +426,35 @@
  /**
   * Retrieves the human-readable name for this shutdown listener.
   *
   * @return  The human-readable name for this shutdown listener.
   */
  public String getShutdownListenerName()
  {
    assert debugEnter(CLASS_NAME, "getShutdownListenerName");
    return handlerName;
  }
  /**
   * Causes this request handler to register itself as a shutdown listener with
   * the Directory Server.  This must be called if the connection handler is
   * shut down without closing all associated connections, otherwise the thread
   * would not be stopped by the server.
   */
  public void registerShutdownListener()
  {
    assert debugEnter(CLASS_NAME, "registerShutdownListener");
    DirectoryServer.registerShutdownListener(this);
  }
  /**
   * Indicates that the Directory Server has received a request to stop running
   * and that this shutdown listener should take any action necessary to prepare
   * for it.