From 61b9eb1be03fc03a9f4bb0013a08ff44a1059503 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 20 Apr 2016 14:25:46 +0000
Subject: [PATCH] opendj-server-legacy: added @Override + Autorefactor'ed comments

---
 opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPConnectionHandler.java |  123 ++--------------------------------------
 1 files changed, 7 insertions(+), 116 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPConnectionHandler.java b/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
index 94bb43f..a48be4c 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/LDAPConnectionHandler.java
@@ -74,10 +74,7 @@
     ConfigurationChangeListener<LDAPConnectionHandlerCfg>,
     ServerShutdownListener, AlertGenerator
 {
-
-  /**
-   * Task run periodically by the connection finalizer.
-   */
+  /** Task run periodically by the connection finalizer. */
   private final class ConnectionFinalizerRunnable implements Runnable
   {
     @Override
@@ -99,14 +96,11 @@
         connectionFinalizerActiveJobQueue = connectionFinalizerPendingJobQueue;
         connectionFinalizerPendingJobQueue = tmp;
       }
-
     }
   }
   private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
 
-  /**
-   * Default friendly name for the LDAP connection handler.
-   */
+  /** Default friendly name for the LDAP connection handler. */
   private static final String DEFAULT_FRIENDLY_NAME = "LDAP Connection Handler";
 
   /** SSL instance name used in context creation. */
@@ -132,15 +126,10 @@
   /** Indicates whether to allow the reuse address socket option. */
   private boolean allowReuseAddress;
 
-  /**
-   * The number of request handlers that should be used for this connection
-   * handler.
-   */
+  /** The number of request handlers that should be used for this connection handler. */
   private int numRequestHandlers;
 
-  /**
-   * Indicates whether the Directory Server is in the process of shutting down.
-   */
+  /** Indicates whether the Directory Server is in the process of shutting down. */
   private volatile boolean shutdownRequested;
 
   /* Internal LDAP connection handler state */
@@ -151,9 +140,7 @@
   /** The set of clients that are explicitly allowed access to the server. */
   private Collection<AddressMask> allowedClients;
 
-  /**
-   * The set of clients that have been explicitly denied access to the server.
-   */
+  /** The set of clients that have been explicitly denied access to the server. */
   private Collection<AddressMask> deniedClients;
 
   /**
@@ -165,19 +152,13 @@
   /** The set of listeners for this connection handler. */
   private List<HostPort> listeners;
 
-  /**
-   * The set of request handlers that are associated with this connection
-   * handler.
-   */
+  /** The set of request handlers that are associated with this connection handler. */
   private LDAPRequestHandler[] requestHandlers;
 
   /** The set of statistics collected for this connection handler. */
   private LDAPStatistics statTracker;
 
-  /**
-   * The client connection monitor provider associated with this connection
-   * handler.
-   */
+  /** The client connection monitor provider associated with this connection handler. */
   private ClientConnectionMonitorProvider connMonitor;
 
   /**
@@ -227,8 +208,6 @@
   private List<Runnable> connectionFinalizerActiveJobQueue;
   private List<Runnable> connectionFinalizerPendingJobQueue;
 
-
-
   /**
    * Creates a new instance of this LDAP connection handler. It must be
    * initialized before it may be used.
@@ -238,8 +217,6 @@
     this(new WorkQueueStrategy(), null); // Use name from configuration.
   }
 
-
-
   /**
    * Creates a new instance of this LDAP connection handler, using a queueing
    * strategy. It must be initialized before it may be used.
@@ -262,8 +239,6 @@
     // initializeConnectionHandler method.
   }
 
-
-
   /**
    * Indicates whether this connection handler should allow interaction with
    * LDAPv2 clients.
@@ -276,8 +251,6 @@
     return currentConfig.isAllowLDAPV2();
   }
 
-
-
   /**
    * Indicates whether this connection handler should allow the use of the
    * StartTLS extended operation.
@@ -290,9 +263,6 @@
     return currentConfig.isAllowStartTLS() && !currentConfig.isUseSSL();
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public ConfigChangeResult applyConfigurationChange(
       LDAPConnectionHandlerCfg config)
@@ -300,7 +270,6 @@
     final ConfigChangeResult ccr = new ConfigChangeResult();
 
     // Note that the following properties cannot be modified:
-    //
     // * listen port and addresses
     // * use ssl
     // * ssl policy
@@ -363,8 +332,6 @@
     }
   }
 
-
-  /** {@inheritDoc} */
   @Override
   public void finalizeConnectionHandler(LocalizableMessage finalizeReason)
   {
@@ -411,8 +378,6 @@
     }
   }
 
-
-
   /**
    * Retrieves information about the set of alerts that this generator may
    * produce. The map returned should be between the notification type for a
@@ -436,8 +401,6 @@
     return alerts;
   }
 
-
-
   /**
    * Retrieves the fully-qualified name of the Java class for this alert
    * generator implementation.
@@ -451,8 +414,6 @@
     return LDAPConnectionHandler.class.getName();
   }
 
-
-
   /**
    * Retrieves the set of active client connections that have been established
    * through this connection handler.
@@ -471,8 +432,6 @@
     return connectionList;
   }
 
-
-
   /**
    * Retrieves the DN of the configuration entry with which this alert generator
    * is associated.
@@ -486,18 +445,12 @@
     return currentConfig.dn();
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public String getConnectionHandlerName()
   {
     return handlerName;
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public Collection<String> getEnabledSSLCipherSuites()
   {
@@ -509,9 +462,6 @@
     return super.getEnabledSSLCipherSuites();
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public Collection<String> getEnabledSSLProtocols()
   {
@@ -523,17 +473,12 @@
     return super.getEnabledSSLProtocols();
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public Collection<HostPort> getListeners()
   {
     return listeners;
   }
 
-
-
   /**
    * Retrieves the port on which this connection handler is listening for client
    * connections.
@@ -546,8 +491,6 @@
     return listenPort;
   }
 
-
-
   /**
    * Retrieves the maximum length of time in milliseconds that attempts to write
    * to LDAP client connections should be allowed to block.
@@ -561,8 +504,6 @@
     return currentConfig.getMaxBlockedWriteTimeLimit();
   }
 
-
-
   /**
    * Retrieves the maximum ASN.1 element value length that will be allowed by
    * this connection handler.
@@ -575,8 +516,6 @@
     return (int) currentConfig.getMaxRequestSize();
   }
 
-
-
   /**
    * Retrieves the size in bytes of the LDAP response message write buffer
    * defined for this connection handler.
@@ -588,26 +527,18 @@
     return (int) currentConfig.getBufferSize();
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public String getProtocol()
   {
     return protocol;
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public String getShutdownListenerName()
   {
     return handlerName;
   }
 
-
-
   /**
    * Retrieves the SSL client authentication policy for this connection handler.
    *
@@ -618,8 +549,6 @@
     return sslClientAuthPolicy;
   }
 
-
-
   /**
    * Retrieves the set of statistics maintained by this connection handler.
    *
@@ -630,9 +559,6 @@
     return statTracker;
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public void initializeConnectionHandler(ServerContext serverContext, LDAPConnectionHandlerCfg config)
       throws ConfigException, InitializationException
@@ -755,9 +681,6 @@
     config.addLDAPChangeListener(this);
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public boolean isConfigurationAcceptable(ConnectionHandlerCfg configuration,
       List<LocalizableMessage> unacceptableReasons)
@@ -837,8 +760,6 @@
     return null;
   }
 
-
-  /** {@inheritDoc} */
   @Override
   public boolean isConfigurationChangeAcceptable(
       LDAPConnectionHandlerCfg config, List<LocalizableMessage> unacceptableReasons)
@@ -846,8 +767,6 @@
     return isConfigurationAcceptable(config, unacceptableReasons);
   }
 
-
-
   /**
    * Indicates whether this connection handler should maintain usage statistics.
    *
@@ -859,9 +778,6 @@
     return currentConfig.isKeepStats();
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public void processServerShutdown(LocalizableMessage reason)
   {
@@ -885,9 +801,6 @@
     }
   }
 
-
-
-  /** {@inheritDoc} */
   @Override
   public void start()
   {
@@ -911,8 +824,6 @@
     }
   }
 
-
-
   /**
    * Operates in a loop, accepting new connections and ensuring that requests on
    * those connections are handled properly.
@@ -1036,7 +947,6 @@
           listening = false;
           enabled = false;
         }
-
       }
       catch (Exception e)
       {
@@ -1059,7 +969,6 @@
     }
   }
 
-
   /**
    * Serves the incoming connections.
    *
@@ -1103,7 +1012,6 @@
     }
   }
 
-
   /**
    * Open channels for each listen address and register them against this
    * ConnectionHandler's {@link Selector}.
@@ -1138,8 +1046,6 @@
     return numRegistered;
   }
 
-
-
   private void acceptConnection(SocketChannel clientChannel)
       throws DirectoryException
   {
@@ -1234,8 +1140,6 @@
     }
   }
 
-
-
   /**
    * Appends a string representation of this connection handler to the provided
    * buffer.
@@ -1249,8 +1153,6 @@
     buffer.append(handlerName);
   }
 
-
-
   /**
    * Indicates whether this connection handler should use SSL to communicate
    * with clients.
@@ -1263,8 +1165,6 @@
     return currentConfig.isUseSSL();
   }
 
-
-
   /**
    * Cleans up the contents of the selector, closing any server socket channels
    * that might be associated with it. Any connections that might have been
@@ -1301,8 +1201,6 @@
     }
   }
 
-
-
   /**
    * Get the queueing strategy.
    *
@@ -1313,8 +1211,6 @@
     return queueingStrategy;
   }
 
-
-
   /**
    * Creates a TLS Byte Channel instance using the specified socket channel.
    *
@@ -1331,8 +1227,6 @@
     return new TLSByteChannel(channel, sslEngine);
   }
 
-
-
   private SSLEngine createSSLEngine(LDAPConnectionHandlerCfg config,
       SSLContext sslContext) throws DirectoryException
   {
@@ -1382,8 +1276,6 @@
     }
   }
 
-
-
   private void disableAndWarnIfUseSSL(LDAPConnectionHandlerCfg config)
   {
     if (config.isUseSSL())
@@ -1483,5 +1375,4 @@
       }
     }
   }
-
 }

--
Gitblit v1.10.0