From 72650d4cc41c64136d064967d7fec3726d850fee Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Thu, 14 Oct 2010 11:52:28 +0000
Subject: [PATCH] Multiple enhancements and bug fixes to the SDK (update from OpenDS by matthew_swift):

---
 sdk/src/org/opends/sdk/ServerConnectionFactory.java |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/sdk/src/org/opends/sdk/ServerConnectionFactory.java b/sdk/src/org/opends/sdk/ServerConnectionFactory.java
index 72f3928..4985d08 100644
--- a/sdk/src/org/opends/sdk/ServerConnectionFactory.java
+++ b/sdk/src/org/opends/sdk/ServerConnectionFactory.java
@@ -31,17 +31,26 @@
 
 /**
  * A handler interface for accepting new connections from clients.
+ * <p>
+ * A connection listener implementation, such as {@link LDAPListener} or
+ * {@link Connections#newInternalConnectionFactory newInternalConnectionFactory}
+ * , invoke the method {@link #handleAccept(Object) handleAccept} whenever a new
+ * client connection is accepted.
  *
  * @param <C>
  *          The type of client context.
  * @param <R>
  *          The type of request context.
+ * @see LDAPListener
+ * @see Connections#newInternalConnectionFactory(ServerConnectionFactory,
+ *      Object) newInternalConnectionFactory
  */
 public interface ServerConnectionFactory<C, R>
 {
   /**
-   * Returns a {@code ServerConnection} which will be used to handle requests
-   * from a client connection.
+   * Invoked when a new client connection is accepted by the associated
+   * listener. Implementations should return a {@code ServerConnection} which
+   * will be used to handle requests from the client connection.
    *
    * @param clientContext
    *          The protocol dependent context information associated with the
@@ -49,11 +58,11 @@
    *          information about the client such as their address and level
    *          connection security. It may also be used to manage the state of
    *          the client's connection.
-   * @return a {@code ServerConnection} which will be used to handle requests
+   * @return A {@code ServerConnection} which will be used to handle requests
    *         from a client connection.
    * @throws ErrorResultException
    *           If this server connection factory cannot accept the client
    *           connection.
    */
-  ServerConnection<R> accept(C clientContext) throws ErrorResultException;
+  ServerConnection<R> handleAccept(C clientContext) throws ErrorResultException;
 }

--
Gitblit v1.10.0