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 2010/02/01 10:59:43 UTC

svn commit: r905227 - in /james/protocols/trunk: ./ api/ api/src/ api/src/main/ api/src/main/java/ api/src/main/java/org/ api/src/main/java/org/apache/ api/src/main/java/org/apache/james/ api/src/main/java/org/apache/james/api/ api/src/main/java/org/ap...

Author: norman
Date: Mon Feb  1 09:59:40 2010
New Revision: 905227

URL: http://svn.apache.org/viewvc?rev=905227&view=rev
Log:
rename packages /modules

Added:
    james/protocols/trunk/api/
    james/protocols/trunk/api/pom.xml
    james/protocols/trunk/api/src/
    james/protocols/trunk/api/src/main/
    james/protocols/trunk/api/src/main/java/
    james/protocols/trunk/api/src/main/java/org/
    james/protocols/trunk/api/src/main/java/org/apache/
    james/protocols/trunk/api/src/main/java/org/apache/james/
    james/protocols/trunk/api/src/main/java/org/apache/james/api/
    james/protocols/trunk/api/src/main/java/org/apache/james/api/protocol/
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/BaseRequest.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/CommandHandler.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ConnectHandler.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ExtensibleHandler.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/HandlersPackage.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/LineHandler.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolHandlerChain.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSession.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/Request.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/Response.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/RetCodeResponse.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/TLSSupportedSession.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/WiringException.java
    james/protocols/trunk/src/
Removed:
    james/protocols/trunk/socket-api/
Modified:
    james/protocols/trunk/pom.xml
    james/protocols/trunk/smtp/pom.xml
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPRequest.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPResponse.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPSession.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/AbstractHookableCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataLineFilter.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataLineMessageHookHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/ExpnCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/HelpCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/MailCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/NoopCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/RcptCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/ReceivedDataLineFilter.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/RsetCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/SMTPCommandDispatcherLineHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/UnknownCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/VrfyCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/WelcomeMessageHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/AuthCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/EhloCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/MailSizeEsmtpExtension.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/StartTlsCmdHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/fastfail/AbstractGreylistHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/fastfail/DNSRBLHandler.java
    james/protocols/trunk/smtp/src/test/java/org/apache/james/smtpserver/protocol/BaseFakeSMTPSession.java

Added: james/protocols/trunk/api/pom.xml
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/pom.xml?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/pom.xml (added)
+++ james/protocols/trunk/api/pom.xml Mon Feb  1 09:59:40 2010
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-15"?>
+<!--
+  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.    
+-->
+<project>
+  <parent>
+    <artifactId>james-server</artifactId>
+    <groupId>org.apache.james</groupId>
+    <version>3.0-M1</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.james</groupId>
+  <artifactId>james-server-socket-api</artifactId>
+  <name>Apache JAMES Server Socket API</name>
+  <dependencies>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+    </dependency>
+  </dependencies>
+</project>
\ No newline at end of file

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/AbstractCommandDispatcher.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,196 @@
+/****************************************************************
+ * 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.protocols.api;
+
+import java.io.UnsupportedEncodingException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+
+
+
+/**
+ * Abstract base class which CommandDispatcher implementations should extend
+ *
+ */
+public abstract class AbstractCommandDispatcher<Session extends ProtocolSession> implements ExtensibleHandler, LineHandler<Session> {
+    /**
+     * The list of available command handlers
+     */
+    private HashMap<String, List<CommandHandler<Session>>> commandHandlerMap = new HashMap<String, List<CommandHandler<Session>>>();
+
+    /**
+     * Add it to map (key as command name, value is an array list of CommandHandlers)
+     *
+     * @param commandName the command name which will be key
+     * @param cmdHandler The CommandHandler object
+     */
+    protected void addToMap(String commandName, CommandHandler<Session> cmdHandler) {
+        List<CommandHandler<Session>> handlers = commandHandlerMap.get(commandName);
+        if(handlers == null) {
+            handlers = new ArrayList<CommandHandler<Session>>();
+            commandHandlerMap.put(commandName, handlers);
+        }
+        handlers.add(cmdHandler);
+    }
+
+
+    /**
+     * Returns all the configured CommandHandlers for the specified command
+     *
+     * @param command the command name which will be key
+     * @param session not null
+     * @return List of CommandHandlers
+     */
+    protected List<CommandHandler<Session>> getCommandHandlers(String command, ProtocolSession session) {
+        if (command == null) {
+            return null;
+        }
+        if (session.getLogger().isDebugEnabled()) {
+            session.getLogger().debug("Lookup command handler for command: " + command);
+        }
+        List<CommandHandler<Session>> handlers =  commandHandlerMap.get(command);
+        if(handlers == null) {
+            handlers = commandHandlerMap.get(getUnknownCommandHandlerIdentifier());
+        }
+
+        return handlers;
+    }
+
+    /**
+     * @throws WiringException 
+     * @see org.apache.james.protocols.api.ExtensibleHandler#wireExtensions(java.lang.Class, java.util.List)
+     */
+    @SuppressWarnings("unchecked")
+    public void wireExtensions(Class interfaceName, List extension) throws WiringException {
+        this.commandHandlerMap = new HashMap<String, List<CommandHandler<Session>>>();
+
+        for (Iterator it = extension.iterator(); it.hasNext(); ) {
+            CommandHandler handler = (CommandHandler) it.next();
+            Collection implCmds = handler.getImplCommands();
+    
+            for (Iterator i = implCmds.iterator(); i.hasNext(); ) {
+                String commandName = ((String) i.next()).trim().toUpperCase(Locale.US);
+                addToMap(commandName, (CommandHandler) handler);
+            }
+        }
+
+        addToMap(getUnknownCommandHandlerIdentifier(), getUnknownCommandHandler());
+
+        if (commandHandlerMap.size() < 2) {
+            throw new WiringException("No commandhandlers configured");
+        } else {
+            List<String> mandatoryCommands = getMandatoryCommands();
+            for (int i = 0; i < mandatoryCommands.size(); i++) {
+                if (!commandHandlerMap.containsKey(mandatoryCommands.get(i))) {
+                    throw new WiringException(
+                    "No commandhandlers configured for mandatory commands");
+                }
+            }
+        }
+
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see org.apache.james.api.protocol.LineHandler#onLine(org.apache.james.api.protocol.ProtocolSession, byte[])
+     */
+    public void onLine(Session session, byte[] line) {
+        String curCommandName = null;
+        String curCommandArgument = null;
+        String cmdString;
+
+        try {
+            cmdString = new String(line, getLineDecodingCharset()).trim(); 
+            int spaceIndex = cmdString.indexOf(" ");
+            if (spaceIndex > 0) {
+                curCommandName = cmdString.substring(0, spaceIndex);
+                curCommandArgument = cmdString.substring(spaceIndex + 1);
+            } else {
+                curCommandName = cmdString;
+            }
+            curCommandName = curCommandName.toUpperCase(Locale.US);
+
+            List<CommandHandler<Session>> commandHandlers = getCommandHandlers(curCommandName, session);
+            // fetch the command handlers registered to the command
+            int count = commandHandlers.size();
+            for (int i = 0; i < count; i++) {
+                Response response = commandHandlers.get(i).onCommand(session, new BaseRequest(curCommandName, curCommandArgument));
+                session.writeResponse(response);
+
+                // if the response is received, stop processing of command
+                // handlers
+                if (response != null) {
+                    break;
+                }
+
+                // NOTE we should never hit this line, otherwise we ended the
+                // CommandHandlers with
+                // no responses.
+                // (The note is valid for i == count-1)
+            }
+
+        } catch (UnsupportedEncodingException e) {
+            // Should never happen
+            e.printStackTrace();
+        }
+
+       
+    }
+
+    protected String getLineDecodingCharset() {
+        return "US-ASCII";
+    }
+
+    /**
+     * @see org.apache.james.protocols.api.ExtensibleHandler#getMarkerInterfaces()
+     */
+    @SuppressWarnings("unchecked")
+    public List<Class<?>> getMarkerInterfaces() {
+        List res = new LinkedList();
+        res.add(CommandHandler.class);
+        return res;
+    }
+
+    /**
+     * Return a List which holds all mandatory commands
+     * 
+     * @return mCommands
+     */
+    protected abstract List<String> getMandatoryCommands();
+    
+    /**
+     * Return the identifier to lookup the UnknownCmdHandler in the handler map
+     * 
+     * @return identifier
+     */
+    protected abstract String getUnknownCommandHandlerIdentifier();
+    
+    /**
+     * Return the CommandHandler which should use to handle unknown commands
+     * 
+     * @return unknownCmdHandler
+     */
+    protected abstract CommandHandler<Session> getUnknownCommandHandler();
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/BaseRequest.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/BaseRequest.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/BaseRequest.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/BaseRequest.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,61 @@
+/****************************************************************
+ * 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.protocols.api;
+
+/**
+ * Basic Request which contains a command and argument
+ *
+ */
+public class BaseRequest implements Request{
+
+    private final String command;
+    private final String argument;
+
+    public BaseRequest(final String command, final String argument) {
+        this.command = command;
+        this.argument = argument;
+        
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see org.apache.james.api.protocol.Request#getArgument()
+     */
+    public String getArgument() {
+        return argument;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.james.api.protocol.Request#getCommand()
+     */
+    public String getCommand() {
+        return command;
+    }
+
+
+    public String toString() {
+        if (argument == null) {
+            return command;
+        } else {
+            return command + " " + argument;
+        }
+    }
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/CommandHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/CommandHandler.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/CommandHandler.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/CommandHandler.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,47 @@
+/****************************************************************
+ * 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.protocols.api;
+
+
+import java.util.Collection;
+
+
+/**
+ * Custom command handlers must implement this interface
+ * The command handlers will be Server wide common to all the handlers,
+ * therefore the command handlers must store all the state information
+ * in the Session object
+ */
+ public interface CommandHandler<Session extends ProtocolSession> {
+    /**
+     * Handle the command
+    **/
+    Response onCommand(Session session, Request request);
+    
+    /**
+     * Return a Collection of implemented commands
+     * 
+     * @return Collection which contains implemented commands
+     */
+    Collection<String> getImplCommands();
+
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ConnectHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ConnectHandler.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ConnectHandler.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ConnectHandler.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,36 @@
+/****************************************************************
+ * 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.protocols.api;
+
+/**
+ * Custom connect handlers must implement this interface
+ * The connect handlers will be server-wide common to all the Handlers ,
+ * therefore the handlers must store all the state information
+ * in the Session object
+ */
+public interface ConnectHandler<Session extends ProtocolSession> {
+    /**
+     * Handle connection
+    **/
+    public void onConnect(Session session);
+
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ExtensibleHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ExtensibleHandler.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ExtensibleHandler.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ExtensibleHandler.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,47 @@
+/****************************************************************
+ * 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.protocols.api;
+
+import java.util.List;
+
+
+
+/**
+ * Handlers extends this interface to be notified of available
+ * extensions of the given type.
+ */
+public interface ExtensibleHandler {
+     
+    /**
+     * Return a List of interfaces of plugins that will
+     * extend this.
+     */
+    List<Class<?>> getMarkerInterfaces();
+    
+    /**
+     * Method called during initialization after all the handlers have been declared
+     * in the handlerchain.
+     * 
+     * @param interfaceName
+     * @param extension a list of objects implementing the marker interface
+     */
+    void wireExtensions(Class<?> interfaceName, List<?> extension) throws WiringException;
+    
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/HandlersPackage.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/HandlersPackage.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/HandlersPackage.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/HandlersPackage.java Mon Feb  1 09:59:40 2010
@@ -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.protocols.api;
+
+import java.util.List;
+
+/**
+ * Provides a mean to bundle a set of handlers (defined by their classnames) within
+ * a single object.
+ * This is used for the default set of CoreCommands.
+ */
+public interface HandlersPackage {
+    
+    /**
+     * Return a List which contains a set of CommandHandlers
+     * 
+     * @return Map
+     */
+    List<String> getHandlers();
+
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/LineHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/LineHandler.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/LineHandler.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/LineHandler.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,35 @@
+/****************************************************************
+ * 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.protocols.api;
+
+/**
+ * Custom line handlers must implement this interface
+ */
+public interface LineHandler<Session extends ProtocolSession> {
+     
+    /**
+     * Processing the give line. The line includes the CRLF delimiter
+     * 
+     * @param session not null
+     * @param line not null 
+     */
+    public void onLine(Session session, byte[] line);
+    
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolHandlerChain.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolHandlerChain.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolHandlerChain.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolHandlerChain.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,16 @@
+package org.apache.james.protocols.api;
+
+import java.util.LinkedList;
+
+public interface ProtocolHandlerChain {
+
+    /**
+     * Returns a list of handler of the requested type.
+     * @param <T>
+     * 
+     * @param type the type of handler we're interested in
+     * @return a List of handlers
+     */
+    public abstract <T> LinkedList<T> getHandlers(Class<T> type);
+
+}
\ No newline at end of file

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSession.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSession.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSession.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSession.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,72 @@
+/****************************************************************
+ * 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.protocols.api;
+
+import java.util.Map;
+
+import org.apache.commons.logging.Log;
+
+/**
+ * Session for a protcol. Every new connection generates a new session
+ * 
+ *
+ */
+public interface ProtocolSession {
+   
+    /**
+     * Gets the context sensitive log for this session.
+     * @return log, not null
+     */
+    public Log getLogger();
+    
+    
+    /**
+     * Return Map which can be used to store objects within a session
+     * 
+     * @return state
+     */
+    public Map<String, Object> getState();
+    
+    /**
+     * Reset the state
+     */
+    public void resetState();
+    
+    /**
+     * Write the response back to the client
+     * 
+     * @param response
+     */
+    public void writeResponse(Response response);
+    
+    /**
+     * Returns host name of the client
+     *
+     * @return hostname of the client
+     */
+    public String getRemoteHost();
+
+    /**
+     * Returns host ip address of the client
+     *
+     * @return host ip address of the client
+     */
+    public String getRemoteIPAddress();
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/Request.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/Request.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/Request.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/Request.java Mon Feb  1 09:59:40 2010
@@ -0,0 +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.protocols.api;
+
+/**
+ * Request received from the client
+ * 
+ *
+ */
+public interface Request {
+
+    
+    /**
+     * Return the current argument. If there is no argument null is returned
+     * 
+     * @return argument
+     */
+    public String getArgument();
+
+    /**
+     * Return the current command
+     * 
+     * @return command
+     */
+    public String getCommand();
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/Response.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/Response.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/Response.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/Response.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,66 @@
+/****************************************************************
+ * 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.protocols.api;
+
+import java.util.List;
+
+/**
+ * Protocol response to send to the client
+ * 
+ *
+ */
+public interface Response {
+
+    
+    /**
+     * Append line to response
+     * 
+     * @param line 
+     */
+    public void appendLine(CharSequence line);
+   
+    /**
+     * Return a List of all response lines stored in this Response
+     * 
+     * @return all responseLines
+     */
+    public List<CharSequence> getLines();
+
+    /**
+     * Return the raw representation of the stored Response
+     * 
+     * @return rawLine the raw Response
+     */
+    public String getRawLine();
+
+    /**
+     * Return true if the session is ended
+     * 
+     * @return true if session is ended
+     */
+    public boolean isEndSession();
+    /**
+     * Set to true to end the session
+     * 
+     * @param endSession
+     */
+    public void setEndSession(boolean endSession);
+
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/RetCodeResponse.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/RetCodeResponse.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/RetCodeResponse.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/RetCodeResponse.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,42 @@
+/****************************************************************
+ * 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.protocols.api;
+
+/**
+ * Response which use return code 
+ * 
+ *
+ */
+public interface RetCodeResponse extends Response{
+
+    /**
+     * Return return-code
+     * @return
+     */
+    public String getRetCode();
+
+
+    /**
+     * Set the return-code used for this response
+     * 
+     * @param retCode
+     */
+    public void setRetCode(String retCode);
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/TLSSupportedSession.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/TLSSupportedSession.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/TLSSupportedSession.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/TLSSupportedSession.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,68 @@
+/****************************************************************
+ * 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.protocols.api;
+
+import java.io.IOException;
+
+/**
+ * Session which supports TLS 
+ * 
+ *
+ */
+public interface TLSSupportedSession extends ProtocolSession{
+    /**
+     * Returns the user name associated with this interaction.
+     *
+     * @return the user name
+     */
+    String getUser();
+
+    /**
+     * Sets the user name associated with this interaction.
+     *
+     * @param user the user name
+     */
+    void setUser(String user);
+    
+
+  
+	/**
+	 * Return true if StartTLS is supported by the configuration
+	 * 
+	 * @return supported
+	 */
+    boolean isStartTLSSupported();
+    
+    /**
+     * Return true if the starttls was started
+     * 
+     * @return true
+     */
+    boolean isTLSStarted();
+
+    /**
+     * Start TLS encryption 
+     * 
+     * @throws IOException
+     */
+    void startTLS() throws IOException;
+    
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/WiringException.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/WiringException.java?rev=905227&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/WiringException.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/WiringException.java Mon Feb  1 09:59:40 2010
@@ -0,0 +1,58 @@
+/****************************************************************
+ * 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.protocols.api;
+
+/**
+ * Indicates an issue prevent the successful wiring of the components
+ * composing the SMTP processor.
+ */
+public class WiringException extends Exception {
+
+    private static final long serialVersionUID = 8824880646965171467L;
+
+    /**
+     * Empty constructor
+     */
+    public WiringException() {
+        super();
+    }
+
+    /**
+     * @param message
+     * @param t
+     */
+    public WiringException(String message, Throwable t) {
+        super(message, t);
+    }
+
+    /**
+     * @param message
+     */
+    public WiringException(String message) {
+        super(message);
+    }
+
+    /**
+     * @param t
+     */
+    public WiringException(Throwable t) {
+        super(t);
+    }
+
+}

Modified: james/protocols/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/protocols/trunk/pom.xml?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/pom.xml (original)
+++ james/protocols/trunk/pom.xml Mon Feb  1 09:59:40 2010
@@ -157,9 +157,14 @@
   </distributionManagement>
   <dependencyManagement>
     <dependencies>
+      <dependency>
+        <groupId>org.apache.james.protocols</groupId>
+        <artifactId>protocols-smtp</artifactId>
+        <version>1.0-SNAPSHOT</version>
+      </dependency>
       <dependency>
         <groupId>org.apache.james.protocols</groupId>
-        <artifactId>api</artifactId>
+        <artifactId>protocols-api</artifactId>
         <version>1.0-SNAPSHOT</version>
       </dependency>
       <dependency>

Modified: james/protocols/trunk/smtp/pom.xml
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/pom.xml?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/pom.xml (original)
+++ james/protocols/trunk/smtp/pom.xml Mon Feb  1 09:59:40 2010
@@ -25,12 +25,12 @@
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.james.protocols</groupId>
-  <artifactId>smtp</artifactId>
+  <artifactId>protocols-smtp</artifactId>
   <name>Apache JAMES SMTP Protocol</name>
   <dependencies>
     <dependency>
       <groupId>org.apache.james.protocols</groupId>
-      <artifactId>api</artifactId>
+      <artifactId>protocols-api</artifactId>
     </dependency>
     <dependency>
       <groupId>commons-logging</groupId>

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPRequest.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPRequest.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPRequest.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPRequest.java Mon Feb  1 09:59:40 2010
@@ -19,7 +19,7 @@
 
 package org.apache.james.smtpserver.protocol;
 
-import org.apache.james.api.protocol.BaseRequest;
+import org.apache.james.protocols.api.BaseRequest;
 
 /**
  * SMTPRequest which contains a command and an optional argument

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPResponse.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPResponse.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPResponse.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPResponse.java Mon Feb  1 09:59:40 2010
@@ -22,7 +22,7 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.apache.james.api.protocol.RetCodeResponse;
+import org.apache.james.protocols.api.RetCodeResponse;
 
 /**
  * Contains an SMTP result

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPSession.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPSession.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPSession.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/SMTPSession.java Mon Feb  1 09:59:40 2010
@@ -21,8 +21,8 @@
 
 import java.util.Map;
 
-import org.apache.james.api.protocol.LineHandler;
-import org.apache.james.api.protocol.TLSSupportedSession;
+import org.apache.james.protocols.api.LineHandler;
+import org.apache.james.protocols.api.TLSSupportedSession;
 
 /**
  * All the handlers access this interface to communicate with

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/AbstractHookableCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/AbstractHookableCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/AbstractHookableCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/AbstractHookableCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -22,10 +22,10 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.james.api.protocol.CommandHandler;
-import org.apache.james.api.protocol.ExtensibleHandler;
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
+import org.apache.james.protocols.api.CommandHandler;
+import org.apache.james.protocols.api.ExtensibleHandler;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;
@@ -181,7 +181,7 @@
     
 
     /**
-     * @see org.apache.james.api.protocol.ExtensibleHandler#getMarkerInterfaces()
+     * @see org.apache.james.protocols.api.ExtensibleHandler#getMarkerInterfaces()
      */
     public List<Class<?>> getMarkerInterfaces() {
         List<Class<?>> classes = new ArrayList<Class<?>>(2);
@@ -198,7 +198,7 @@
     protected abstract Class<Hook> getHookInterface();
 
     /**
-     * @see org.apache.james.api.protocol.ExtensibleHandler#wireExtensions(java.lang.Class,
+     * @see org.apache.james.protocols.api.ExtensibleHandler#wireExtensions(java.lang.Class,
      *      java.util.List)
      */
     @SuppressWarnings("unchecked")

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -23,13 +23,13 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.apache.james.api.protocol.CommandHandler;
-import org.apache.james.api.protocol.ExtensibleHandler;
-import org.apache.james.api.protocol.LineHandler;
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
-import org.apache.james.api.protocol.WiringException;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.CommandHandler;
+import org.apache.james.protocols.api.ExtensibleHandler;
+import org.apache.james.protocols.api.LineHandler;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
+import org.apache.james.protocols.api.WiringException;
 import org.apache.james.smtpserver.protocol.MailEnvelopeImpl;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
@@ -128,7 +128,7 @@
 
 
     /**
-     * @see org.apache.james.api.protocol.ExtensibleHandler#getMarkerInterfaces()
+     * @see org.apache.james.protocols.api.ExtensibleHandler#getMarkerInterfaces()
      */
     @SuppressWarnings("unchecked")
     public List getMarkerInterfaces() {
@@ -139,7 +139,7 @@
 
 
     /**
-     * @see org.apache.james.api.protocol.ExtensibleHandler#wireExtensions(java.lang.Class, java.util.List)
+     * @see org.apache.james.protocols.api.ExtensibleHandler#wireExtensions(java.lang.Class, java.util.List)
      */
     @SuppressWarnings("unchecked")
     public void wireExtensions(Class interfaceName, List extension) throws WiringException {

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataLineFilter.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataLineFilter.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataLineFilter.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataLineFilter.java Mon Feb  1 09:59:40 2010
@@ -21,7 +21,7 @@
 
 package org.apache.james.smtpserver.protocol.core;
 
-import org.apache.james.api.protocol.LineHandler;
+import org.apache.james.protocols.api.LineHandler;
 import org.apache.james.smtpserver.protocol.SMTPSession;
 
 /**

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataLineMessageHookHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataLineMessageHookHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataLineMessageHookHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/DataLineMessageHookHandler.java Mon Feb  1 09:59:40 2010
@@ -26,10 +26,10 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.apache.james.api.protocol.ExtensibleHandler;
-import org.apache.james.api.protocol.LineHandler;
-import org.apache.james.api.protocol.WiringException;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.ExtensibleHandler;
+import org.apache.james.protocols.api.LineHandler;
+import org.apache.james.protocols.api.WiringException;
 import org.apache.james.smtpserver.protocol.MailEnvelopeImpl;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
@@ -125,7 +125,7 @@
     }
     
     /**
-     * @see org.apache.james.api.protocol.ExtensibleHandler#wireExtensions(java.lang.Class, java.util.List)
+     * @see org.apache.james.protocols.api.ExtensibleHandler#wireExtensions(java.lang.Class, java.util.List)
      */
     @SuppressWarnings("unchecked")
     public void wireExtensions(Class interfaceName, List extension) throws WiringException {
@@ -140,7 +140,7 @@
     }
 
     /**
-     * @see org.apache.james.api.protocol.ExtensibleHandler#getMarkerInterfaces()
+     * @see org.apache.james.protocols.api.ExtensibleHandler#getMarkerInterfaces()
      */
     public List<Class<?>> getMarkerInterfaces() {
         List<Class<?>> classes = new LinkedList<Class<?>>();

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/ExpnCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/ExpnCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/ExpnCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/ExpnCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -24,10 +24,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-import org.apache.james.api.protocol.CommandHandler;
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.CommandHandler;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/HelpCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/HelpCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/HelpCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/HelpCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -24,10 +24,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-import org.apache.james.api.protocol.CommandHandler;
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.CommandHandler;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/MailCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/MailCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/MailCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/MailCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -28,10 +28,10 @@
 import java.util.Map;
 import java.util.StringTokenizer;
 
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
-import org.apache.james.api.protocol.RetCodeResponse;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
+import org.apache.james.protocols.api.RetCodeResponse;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/NoopCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/NoopCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/NoopCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/NoopCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -24,10 +24,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-import org.apache.james.api.protocol.CommandHandler;
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.CommandHandler;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/RcptCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/RcptCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/RcptCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/RcptCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -24,8 +24,8 @@
 import java.util.Locale;
 import java.util.StringTokenizer;
 
-import org.apache.james.api.protocol.CommandHandler;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.CommandHandler;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/ReceivedDataLineFilter.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/ReceivedDataLineFilter.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/ReceivedDataLineFilter.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/ReceivedDataLineFilter.java Mon Feb  1 09:59:40 2010
@@ -23,7 +23,7 @@
 import java.util.Date;
 import java.util.List;
 
-import org.apache.james.api.protocol.LineHandler;
+import org.apache.james.protocols.api.LineHandler;
 import org.apache.james.smtpserver.protocol.SMTPSession;
 import org.apache.mailet.base.RFC2822Headers;
 import org.apache.mailet.base.RFC822DateFormat;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/RsetCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/RsetCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/RsetCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/RsetCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -24,10 +24,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-import org.apache.james.api.protocol.CommandHandler;
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.CommandHandler;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/SMTPCommandDispatcherLineHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/SMTPCommandDispatcherLineHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/SMTPCommandDispatcherLineHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/SMTPCommandDispatcherLineHandler.java Mon Feb  1 09:59:40 2010
@@ -22,8 +22,8 @@
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.james.api.protocol.AbstractCommandDispatcher;
-import org.apache.james.api.protocol.CommandHandler;
+import org.apache.james.protocols.api.AbstractCommandDispatcher;
+import org.apache.james.protocols.api.CommandHandler;
 import org.apache.james.smtpserver.protocol.SMTPSession;
 
 
@@ -42,21 +42,21 @@
 
 
     /**
-     * @see org.apache.james.api.protocol.AbstractCommandDispatcher#getUnknownCommandHandlerIdentifier()
+     * @see org.apache.james.protocols.api.AbstractCommandDispatcher#getUnknownCommandHandlerIdentifier()
      */
     protected String getUnknownCommandHandlerIdentifier() {
         return UnknownCmdHandler.UNKNOWN_COMMAND;
     }
 
     /**
-     * @see org.apache.james.api.protocol.AbstractCommandDispatcher#getMandatoryCommands()
+     * @see org.apache.james.protocols.api.AbstractCommandDispatcher#getMandatoryCommands()
      */
     protected List<String> getMandatoryCommands() {
         return Arrays.asList(mandatoryCommands);
     }
 
     /**
-     * @see org.apache.james.api.protocol.AbstractCommandDispatcher#getUnknownCommandHandler()
+     * @see org.apache.james.protocols.api.AbstractCommandDispatcher#getUnknownCommandHandler()
      */
     protected CommandHandler<SMTPSession> getUnknownCommandHandler() {
         return unknownHandler;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/UnknownCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/UnknownCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/UnknownCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/UnknownCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -24,10 +24,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-import org.apache.james.api.protocol.CommandHandler;
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.CommandHandler;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/VrfyCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/VrfyCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/VrfyCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/VrfyCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -24,10 +24,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 
-import org.apache.james.api.protocol.CommandHandler;
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.CommandHandler;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/WelcomeMessageHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/WelcomeMessageHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/WelcomeMessageHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/WelcomeMessageHandler.java Mon Feb  1 09:59:40 2010
@@ -22,7 +22,7 @@
 
 import java.util.Date;
 
-import org.apache.james.api.protocol.ConnectHandler;
+import org.apache.james.protocols.api.ConnectHandler;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/AuthCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/AuthCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/AuthCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/AuthCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -30,13 +30,13 @@
 import java.util.StringTokenizer;
 
 import org.apache.commons.codec.binary.Base64;
-import org.apache.james.api.protocol.CommandHandler;
-import org.apache.james.api.protocol.ExtensibleHandler;
-import org.apache.james.api.protocol.LineHandler;
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
-import org.apache.james.api.protocol.WiringException;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.CommandHandler;
+import org.apache.james.protocols.api.ExtensibleHandler;
+import org.apache.james.protocols.api.LineHandler;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
+import org.apache.james.protocols.api.WiringException;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;
@@ -435,7 +435,7 @@
     }
 
     /**
-     * @see org.apache.james.api.protocol.ExtensibleHandler#getMarkerInterfaces()
+     * @see org.apache.james.protocols.api.ExtensibleHandler#getMarkerInterfaces()
      */
     public List<Class<?>> getMarkerInterfaces() {
         List<Class<?>> classes = new ArrayList<Class<?>>(1);
@@ -445,7 +445,7 @@
 
 
     /**
-     * @see org.apache.james.api.protocol.ExtensibleHandler#wireExtensions(java.lang.Class, java.util.List)
+     * @see org.apache.james.protocols.api.ExtensibleHandler#wireExtensions(java.lang.Class, java.util.List)
      */
     public void wireExtensions(Class interfaceName, List extension) throws WiringException {
         if (AuthHook.class.equals(interfaceName)) {

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/EhloCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/EhloCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/EhloCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/EhloCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -83,7 +83,7 @@
     }
 
     /**
-     * @see org.apache.james.api.protocol.ExtensibleHandler#getMarkerInterfaces()
+     * @see org.apache.james.protocols.api.ExtensibleHandler#getMarkerInterfaces()
      */
     public List<Class<?>> getMarkerInterfaces() {
         List<Class<?>> classes = super.getMarkerInterfaces();
@@ -92,7 +92,7 @@
     }
 
     /**
-     * @see org.apache.james.api.protocol.ExtensibleHandler#wireExtensions(java.lang.Class,
+     * @see org.apache.james.protocols.api.ExtensibleHandler#wireExtensions(java.lang.Class,
      *      java.util.List)
      */
     public void wireExtensions(Class interfaceName, List extension) {

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/MailSizeEsmtpExtension.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/MailSizeEsmtpExtension.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/MailSizeEsmtpExtension.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/MailSizeEsmtpExtension.java Mon Feb  1 09:59:40 2010
@@ -6,8 +6,8 @@
 import java.util.LinkedList;
 import java.util.List;
 
-import org.apache.james.api.protocol.LineHandler;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.LineHandler;
 import org.apache.james.smtpserver.protocol.MailEnvelope;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/StartTlsCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/StartTlsCmdHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/StartTlsCmdHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/esmtp/StartTlsCmdHandler.java Mon Feb  1 09:59:40 2010
@@ -24,10 +24,10 @@
 import java.util.Collection;
 import java.util.List;
 
-import org.apache.james.api.protocol.CommandHandler;
-import org.apache.james.api.protocol.Request;
-import org.apache.james.api.protocol.Response;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.CommandHandler;
+import org.apache.james.protocols.api.Request;
+import org.apache.james.protocols.api.Response;
 import org.apache.james.smtpserver.protocol.SMTPResponse;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/fastfail/AbstractGreylistHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/fastfail/AbstractGreylistHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/fastfail/AbstractGreylistHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/fastfail/AbstractGreylistHandler.java Mon Feb  1 09:59:40 2010
@@ -21,8 +21,6 @@
 
 import java.util.Iterator;
 
-import javax.annotation.Resource;
-
 import org.apache.james.dsn.DSNStatus;
 import org.apache.james.smtpserver.protocol.SMTPRetCode;
 import org.apache.james.smtpserver.protocol.SMTPSession;

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/fastfail/DNSRBLHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/fastfail/DNSRBLHandler.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/fastfail/DNSRBLHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/smtpserver/protocol/core/fastfail/DNSRBLHandler.java Mon Feb  1 09:59:40 2010
@@ -24,8 +24,8 @@
 import java.util.Collection;
 import java.util.StringTokenizer;
 
-import org.apache.james.api.protocol.ConnectHandler;
 import org.apache.james.dsn.DSNStatus;
+import org.apache.james.protocols.api.ConnectHandler;
 import org.apache.james.smtpserver.protocol.DNSService;
 import org.apache.james.smtpserver.protocol.SMTPSession;
 import org.apache.james.smtpserver.protocol.hook.HookResult;

Modified: james/protocols/trunk/smtp/src/test/java/org/apache/james/smtpserver/protocol/BaseFakeSMTPSession.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/test/java/org/apache/james/smtpserver/protocol/BaseFakeSMTPSession.java?rev=905227&r1=905226&r2=905227&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/test/java/org/apache/james/smtpserver/protocol/BaseFakeSMTPSession.java (original)
+++ james/protocols/trunk/smtp/src/test/java/org/apache/james/smtpserver/protocol/BaseFakeSMTPSession.java Mon Feb  1 09:59:40 2010
@@ -25,8 +25,8 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.james.api.protocol.LineHandler;
-import org.apache.james.api.protocol.Response;
+import org.apache.james.protocols.api.LineHandler;
+import org.apache.james.protocols.api.Response;
 import org.apache.james.smtpserver.protocol.SMTPConfiguration;
 import org.apache.james.smtpserver.protocol.SMTPSession;
 



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