directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r332244 - in /directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol: ExtendedOperationHandler.java support/ExtendedHandler.java
Date Thu, 10 Nov 2005 07:59:04 GMT
Author: trustin
Date: Wed Nov  9 23:59:01 2005
New Revision: 332244

URL: http://svn.apache.org/viewcvs?rev=332244&view=rev
Log:
Changed the signature of ExtendedOperationHandler.handleExtendedRequest() and let the handler
send the response except when any unexpected exception is thrown.

Modified:
    directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/ExtendedOperationHandler.java
    directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/ExtendedHandler.java

Modified: directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/ExtendedOperationHandler.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/ExtendedOperationHandler.java?rev=332244&r1=332243&r2=332244&view=diff
==============================================================================
--- directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/ExtendedOperationHandler.java
(original)
+++ directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/ExtendedOperationHandler.java
Wed Nov  9 23:59:01 2005
@@ -19,7 +19,6 @@
 package org.apache.ldap.server.protocol;
 
 import org.apache.ldap.common.message.ExtendedRequest;
-import org.apache.ldap.common.message.ExtendedResponse;
 import org.apache.mina.common.IoSession;
 
 /**
@@ -38,15 +37,12 @@
     String getOid();
     
     /**
-     * Handles the specified extended operation and fills its response to
-     * <tt>res</tt>.  Don't lock the response; messageID and resultCode might
be
-     * be filled by caller automatically.
+     * Handles the specified extended operation.
      * 
      * @param session the MINA session object related with current connection
      * @param req the LDAP Extended operation request
-     * @param res the LDAP Extended operation response you have to fill its payload
      * 
      * @throws Exception if failed to handle the operation
      */
-    void handleExtendedOperation( IoSession session, SessionRegistry registry, ExtendedRequest
req, ExtendedResponse res ) throws Exception;
+    void handleExtendedOperation( IoSession session, SessionRegistry registry, ExtendedRequest
req ) throws Exception;
 }

Modified: directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/ExtendedHandler.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/ExtendedHandler.java?rev=332244&r1=332243&r2=332244&view=diff
==============================================================================
--- directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/ExtendedHandler.java
(original)
+++ directory/protocol-providers/ldap/trunk/src/main/java/org/apache/ldap/server/protocol/support/ExtendedHandler.java
Wed Nov  9 23:59:01 2005
@@ -94,8 +94,7 @@
                 handler.handleExtendedOperation(
                         session,
                         SessionRegistry.getSingleton(),
-                        req,
-                        res );
+                        req );
             }
             catch( Exception e )
             {
@@ -107,9 +106,8 @@
                         ExceptionUtils.getStackTrace( e ) );
                 res.setLdapResult( result );
                 res.setResponse( new byte[ 0 ] );
+                session.write( res );
             }
         }
-        
-        session.write( res );
     }
 }



Mime
View raw message