You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2006/12/28 12:49:36 UTC

svn commit: r490704 - in /james/server/sandbox/handlerapi-experiment/src: java/org/apache/james/smtpserver/ java/org/apache/james/smtpserver/core/ java/org/apache/james/smtpserver/core/filter/ java/org/apache/james/smtpserver/hook/ test/org/apache/jame...

Author: norman
Date: Thu Dec 28 03:49:34 2006
New Revision: 490704

URL: http://svn.apache.org/viewvc?view=rev&rev=490704
Log:
Modify QuitCmdHandler to extend AbstractHookableCmdHandler, add javadocs and licenseheaders, remove not needed classes. See JAMES-750 and JAMES-549

Added:
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/QuitHook.java   (with props)
Removed:
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/filter/CoreFilterCmdHandlerLoader.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/filter/DataFilterCmdHandler.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/filter/EhloFilterCmdHandler.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/filter/HeloFilterCmdHandler.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/filter/MailFilterCmdHandler.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/filter/RcptFilterCmdHandler.java
Modified:
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPCommandDispatcherLineHandler.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/AbstractHookableCmdHandler.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/QuitCmdHandler.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/EhloHook.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/HeloHook.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/HookReturnCode.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/MailHook.java
    james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/RcptHook.java
    james/server/sandbox/handlerapi-experiment/src/test/org/apache/james/smtpserver/SMTPTestConfiguration.java

Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPCommandDispatcherLineHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPCommandDispatcherLineHandler.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPCommandDispatcherLineHandler.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPCommandDispatcherLineHandler.java Thu Dec 28 03:49:34 2006
@@ -196,4 +196,4 @@
         return handlers;
     }
 
-}
\ No newline at end of file
+}

Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java Thu Dec 28 03:49:34 2006
@@ -32,7 +32,6 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.james.smtpserver.core.CoreCmdHandlerLoader;
-import org.apache.james.smtpserver.core.filter.CoreFilterCmdHandlerLoader;
 
 import java.util.Enumeration;
 import java.util.Iterator;
@@ -89,8 +88,6 @@
                 || configuration.getChildren("handler").length == 0) {
             configuration = new DefaultConfiguration("handlerchain");
             Properties cmds = new Properties();
-            cmds.setProperty("Default CoreCmdFilterHandlerLoader",
-                    CoreFilterCmdHandlerLoader.class.getName());
             cmds.setProperty("Default CoreCmdHandlerLoader", CoreCmdHandlerLoader.class
                     .getName());
             Enumeration e = cmds.keys();
@@ -105,9 +102,6 @@
             Configuration[] children = configuration.getChildren("handler");
             ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
 
-            // load the BaseFilterCmdHandler
-            loadClass(classLoader, CoreFilterCmdHandlerLoader.class.getName(),
-                    addHandler(null, CoreFilterCmdHandlerLoader.class.getName()));
 
             // load the configured handlers
             if (children != null) {
@@ -116,9 +110,7 @@
                     if (className != null) {
 
                         // ignore base handlers.
-                        if (!className.equals(CoreFilterCmdHandlerLoader.class
-                                .getName())
-                                && !className.equals(CoreCmdHandlerLoader.class
+                        if (!className.equals(CoreCmdHandlerLoader.class
                                         .getName())) {
 
                             // load the handler

Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/AbstractHookableCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/AbstractHookableCmdHandler.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/AbstractHookableCmdHandler.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/AbstractHookableCmdHandler.java Thu Dec 28 03:49:34 2006
@@ -33,6 +33,7 @@
 import org.apache.james.smtpserver.hook.HookResult;
 import org.apache.james.smtpserver.hook.HookReturnCode;
 import org.apache.james.smtpserver.hook.MailHook;
+import org.apache.james.smtpserver.hook.QuitHook;
 import org.apache.james.smtpserver.hook.RcptHook;
 import org.apache.james.util.mail.SMTPRetCode;
 import org.apache.mailet.MailAddress;
@@ -100,6 +101,12 @@
                 if ("RCPT".equals(command) && rawHook instanceof RcptHook) {
                     result = ((RcptHook) rawHook).doRcpt(session, (MailAddress) session.getState().get(SMTPSession.SENDER), (MailAddress) session.getState().get(SMTPSession.CURRENT_RECIPIENT));
                 }
+                
+                if("QUIT".equals(command) && rawHook instanceof QuitHook) {
+                    //TODO: Add the right returncode for Quit!
+                    //result = ((QuitHook) rawHook).doQuit(session);
+                }
+                    
                 
                 //TODO: Add more hooks
                 

Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/DataCmdHandler.java Thu Dec 28 03:49:34 2006
@@ -104,7 +104,13 @@
      * @see org.apache.james.smtpserver.CommandHandler#onCommand(SMTPSession)
      */
     public SMTPResponse onCommand(SMTPSession session, String command, String parameters) {
-        return doDATA(session, parameters);
+        SMTPResponse response = doDATAFilter(session,parameters);
+        
+        if (response == null) {
+            return doDATA(session, parameters);
+        } else {
+            return response;
+        }
     }
 
 
@@ -498,5 +504,16 @@
         }
     }
 
+    private SMTPResponse doDATAFilter(SMTPSession session, String argument) {
+        if ((argument != null) && (argument.length() > 0)) {
+            return new SMTPResponse(SMTPRetCode.SYNTAX_ERROR_COMMAND_UNRECOGNIZED, DSNStatus.getStatus(DSNStatus.PERMANENT,DSNStatus.DELIVERY_INVALID_ARG)+" Unexpected argument provided with DATA command");
+        }
+        if (!session.getState().containsKey(SMTPSession.SENDER)) {
+            return new SMTPResponse(SMTPRetCode.BAD_SEQUENCE, DSNStatus.getStatus(DSNStatus.PERMANENT,DSNStatus.DELIVERY_OTHER)+" No sender specified");
+        } else if (!session.getState().containsKey(SMTPSession.RCPT_LIST)) {
+            return new SMTPResponse(SMTPRetCode.BAD_SEQUENCE, DSNStatus.getStatus(DSNStatus.PERMANENT,DSNStatus.DELIVERY_OTHER)+" No recipients specified");
+        }
+        return null;
+    }
 
 }

Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/QuitCmdHandler.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/QuitCmdHandler.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/QuitCmdHandler.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/QuitCmdHandler.java Thu Dec 28 03:49:34 2006
@@ -23,33 +23,26 @@
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 
-import org.apache.james.smtpserver.CommandHandler;
 import org.apache.james.smtpserver.SMTPResponse;
 import org.apache.james.smtpserver.SMTPSession;
+import org.apache.james.smtpserver.WiringException;
+import org.apache.james.smtpserver.hook.QuitHook;
 import org.apache.james.util.mail.SMTPRetCode;
 import org.apache.james.util.mail.dsn.DSNStatus;
 
 /**
   * Handles QUIT command
   */
-public class QuitCmdHandler implements CommandHandler {
+public class QuitCmdHandler extends AbstractHookableCmdHandler  {
 
     /**
      * The name of the command handled by the command handler
      */
     private final static String COMMAND_NAME = "QUIT";
-
-    /**
-     * handles QUIT command
-     *
-     * @see org.apache.james.smtpserver.CommandHandler#onCommand(org.apache.james.smtpserver.SMTPSession, java.lang.String, java.lang.String) 
-     */
-    public SMTPResponse onCommand(SMTPSession session, String command, String parameters) {
-        return doQUIT(session, parameters);
-
-    }
-
+    
+    private List hooks;
 
     /**
      * Handler method called upon receipt of a QUIT command.
@@ -83,6 +76,50 @@
         implCommands.add(COMMAND_NAME);
         
         return implCommands;
+    }
+
+
+    /**
+     * @see org.apache.james.smtpserver.core.AbstractHookableCmdHandler#doCoreCmd(org.apache.james.smtpserver.SMTPSession, java.lang.String, java.lang.String)
+     */
+    protected SMTPResponse doCoreCmd(SMTPSession session, String command, String parameters) {
+    // TODO Auto-generated method stub
+    return doQUIT(session,parameters);
+    }
+
+
+    /**
+     * @see org.apache.james.smtpserver.core.AbstractHookableCmdHandler#doFilterChecks(org.apache.james.smtpserver.SMTPSession, java.lang.String, java.lang.String)
+     */
+    protected SMTPResponse doFilterChecks(SMTPSession session, String command, String parameters) {
+    return null;
+    }
+
+
+    /**
+     * @see org.apache.james.smtpserver.core.AbstractHookableCmdHandler#getHooks()
+     */
+    protected List getHooks() {
+    return hooks;
+    }
+
+
+    /**
+     * @see org.apache.james.smtpserver.ExtensibleHandler#getMarkerInterfaces()
+     */
+    public List getMarkerInterfaces() {
+    List interfaces = new ArrayList(1);
+    interfaces.add(QuitHook.class);
+    return interfaces;
+    }
+
+    /**
+     * @see org.apache.james.smtpserver.ExtensibleHandler#wireExtensions(java.lang.Class, java.util.List)
+     */
+    public void wireExtensions(Class interfaceName, List extension) throws WiringException {
+    if (QuitHook.class.equals(interfaceName)) {
+        hooks = extension;
+    }
     }
 }
 

Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/EhloHook.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/EhloHook.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/EhloHook.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/EhloHook.java Thu Dec 28 03:49:34 2006
@@ -1,8 +1,41 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+
+
+
 package org.apache.james.smtpserver.hook;
 
 import org.apache.james.smtpserver.SMTPSession;
 
+/**
+ * Implement this interfaces to hook in the EHLO Command
+ * 
+ */
 public interface EhloHook {
 
+    /**
+     * Return the HookResult after run the hook
+     * 
+     * @param session the SMTPSession
+     * @param ehlo the ehlo name
+     * @return HockResult
+     */
     public HookResult doEhlo(SMTPSession session, String ehlo);
 }

Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/HeloHook.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/HeloHook.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/HeloHook.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/HeloHook.java Thu Dec 28 03:49:34 2006
@@ -1,8 +1,41 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+
+
+
 package org.apache.james.smtpserver.hook;
 
 import org.apache.james.smtpserver.SMTPSession;
 
+/**
+ * Implement this interfaces to hook in the HELO Command
+ * 
+ */
 public interface HeloHook {
 
+    /**
+     * Return the HookResult after run the hook
+     * 
+     * @param session the SMTPSession
+     * @param helo the helo name
+     * @return HockResult
+     */
     public HookResult doHelo(SMTPSession session, String helo);
 }

Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/HookReturnCode.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/HookReturnCode.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/HookReturnCode.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/HookReturnCode.java Thu Dec 28 03:49:34 2006
@@ -1,3 +1,25 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+
+
+
 package org.apache.james.smtpserver.hook;
 
 public class HookReturnCode {

Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/MailHook.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/MailHook.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/MailHook.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/MailHook.java Thu Dec 28 03:49:34 2006
@@ -1,9 +1,43 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+
+
+
+
 package org.apache.james.smtpserver.hook;
 
 import org.apache.james.smtpserver.SMTPSession;
 import org.apache.mailet.MailAddress;
 
+/**
+ * Implement this interfaces to hook in the MAIL Command
+ * 
+ */
 public interface MailHook {
 
+    /**
+     * Return the HookResult after run the hook
+     * 
+     * @param session the SMTPSession
+     * @param sender the sender MailAddress
+     * @return HockResult
+     */
     public HookResult doMail(SMTPSession session, MailAddress sender);
 }

Added: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/QuitHook.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/QuitHook.java?view=auto&rev=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/QuitHook.java (added)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/QuitHook.java Thu Dec 28 03:49:34 2006
@@ -0,0 +1,40 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+
+
+
+package org.apache.james.smtpserver.hook;
+
+import org.apache.james.smtpserver.SMTPSession;
+
+/**
+ * Implement this interfaces to hook in the MAIL Command
+ * 
+ */
+public interface QuitHook {
+
+    /**
+     * Return the HookResult after run the hook
+     * 
+     * @param session the SMTPSession
+     * @return HockResult
+     */
+    public HookResult doQuit(SMTPSession session);
+}

Propchange: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/QuitHook.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/RcptHook.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/RcptHook.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/RcptHook.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/hook/RcptHook.java Thu Dec 28 03:49:34 2006
@@ -20,10 +20,25 @@
 
 package org.apache.james.smtpserver.hook;
 
+
 import org.apache.james.smtpserver.SMTPSession;
 import org.apache.mailet.MailAddress;
 
+
+/**
+ * Implement this interfaces to hook in the MAIL Command
+ * 
+ */
 public interface RcptHook {
+    
+    /**
+     * Return the HookResult after run the hook
+     * 
+     * @param session the SMTPSession
+     * @param sender the sender MailAddress
+     * @param rcpt the recipient MailAddress
+     * @return HookResult
+     */
     public HookResult doRcpt(SMTPSession session, MailAddress sender, MailAddress rcpt);
 
 }

Modified: james/server/sandbox/handlerapi-experiment/src/test/org/apache/james/smtpserver/SMTPTestConfiguration.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/test/org/apache/james/smtpserver/SMTPTestConfiguration.java?view=diff&rev=490704&r1=490703&r2=490704
==============================================================================
--- james/server/sandbox/handlerapi-experiment/src/test/org/apache/james/smtpserver/SMTPTestConfiguration.java (original)
+++ james/server/sandbox/handlerapi-experiment/src/test/org/apache/james/smtpserver/SMTPTestConfiguration.java Thu Dec 28 03:49:34 2006
@@ -24,7 +24,6 @@
 import org.apache.avalon.framework.configuration.ConfigurationException;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
 import org.apache.james.smtpserver.core.CoreCmdHandlerLoader;
-import org.apache.james.smtpserver.core.filter.CoreFilterCmdHandlerLoader;
 import org.apache.james.smtpserver.core.filter.fastfail.DNSRBLHandler;
 import org.apache.james.smtpserver.core.filter.fastfail.MaxRcptHandler;
 import org.apache.james.smtpserver.core.filter.fastfail.ResolvableEhloHeloHandler;
@@ -177,10 +176,6 @@
             config.addChild(handler);
 
         }
-
-        config.addChild(createHandler(CoreFilterCmdHandlerLoader.class
-                .getName(), null));
-
         if (m_heloResolv || m_ehloResolv) {
             DefaultConfiguration d = createHandler(
                     ResolvableEhloHeloHandler.class.getName(), null);



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org