james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r591913 - in /james/server/trunk: experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ imap-api/src/main/java/org/apache/james/api/imap/process/ imap-mailbox-processor-function/src/main/java/org/apache/jam...
Date Mon, 05 Nov 2007 08:46:22 GMT
Author: rdonkin
Date: Mon Nov  5 00:46:09 2007
New Revision: 591913

URL: http://svn.apache.org/viewvc?rev=591913&view=rev
Log:
IMAPProcessor API now allows multiple response messages to be returned.

Modified:
    james/server/trunk/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ImapRequestHandler.java
    james/server/trunk/imap-api/src/main/java/org/apache/james/api/imap/process/ImapProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractChainedImapProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractImapRequestProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/ImapResponseMessageProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/UnknownRequestImapProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/AppendProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/AuthenticateProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CapabilityProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CheckProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CloseProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CopyProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CreateProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/DeleteProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ExamineProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ExpungeProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/FetchProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ListProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LoginProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LogoutProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LsubProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/NoopProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/RenameProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SearchProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SelectProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/StatusProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/StoreProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SubscribeProcessor.java
    james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/UnsubscribeProcessor.java

Modified: james/server/trunk/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ImapRequestHandler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ImapRequestHandler.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ImapRequestHandler.java (original)
+++ james/server/trunk/experimental-seda-imap-function/src/main/java/org/apache/james/experimental/imapserver/ImapRequestHandler.java Mon Nov  5 00:46:09 2007
@@ -30,6 +30,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.experimental.imapserver.encode.writer.OutputStreamImapResponseWriter;
 import org.apache.james.imapserver.codec.decode.ImapDecoder;
 import org.apache.james.imapserver.codec.decode.ImapRequestLineReader;
@@ -103,9 +104,21 @@
                                    ImapSession session)
     {
         ImapMessage message = decoder.decode(request);
-        ImapResponseMessage responseMessage = processor.process(message, session);
-        encoder.encode(responseMessage, response);
+        processor.process(message, new ResponseEncoder(encoder, response), session);
     }
 
-
+    private static final class ResponseEncoder implements Responder {
+        private final ImapEncoder encoder;
+        private final ImapResponseComposer composer;
+        
+        public ResponseEncoder(final ImapEncoder encoder, final ImapResponseComposer composer) {
+            super();
+            this.encoder = encoder;
+            this.composer = composer;
+        }
+        
+        public void respond(final ImapResponseMessage message) {
+            encoder.encode(message, composer);
+        }
+    }
 }

Modified: james/server/trunk/imap-api/src/main/java/org/apache/james/api/imap/process/ImapProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-api/src/main/java/org/apache/james/api/imap/process/ImapProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-api/src/main/java/org/apache/james/api/imap/process/ImapProcessor.java (original)
+++ james/server/trunk/imap-api/src/main/java/org/apache/james/api/imap/process/ImapProcessor.java Mon Nov  5 00:46:09 2007
@@ -43,5 +43,16 @@
      *            <code>ImapSession</code>
      * @return response, not null
      */
-    public ImapResponseMessage process(ImapMessage message, ImapSession session);
+    public void process(ImapMessage message, Responder responder, ImapSession session);
+    
+    /**
+     * Response message sink.
+     */
+    public interface Responder {
+        /**
+         * Writes the given response.
+         * @param message <code>ImapResponseMessage</code>, not null
+         */
+        public void respond(ImapResponseMessage message);
+    }
 }

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractChainedImapProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractChainedImapProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractChainedImapProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractChainedImapProcessor.java Mon Nov  5 00:46:09 2007
@@ -46,18 +46,15 @@
         setupLogger(next);
     }
 
-    public ImapResponseMessage process(final ImapMessage message,
-            final ImapSession session) {
-        final ImapResponseMessage result;
+    public void process(ImapMessage message, Responder responder, ImapSession session) {
         final boolean isAcceptable = isAcceptable(message);
         if (isAcceptable) {
-            result = doProcess(message, session);
+            doProcess(message, responder, session);
         } else {
-            result = next.process(message, session);
+            next.process(message, responder, session);
         }
-        return result;
     }
-
+    
     /**
      * Is the given message acceptable?
      * 
@@ -73,10 +70,11 @@
      * 
      * @param acceptableMessage
      *            <code>ImapMessage</code>, not null
+     * @param responder <code>Responder</code>, not null
      * @param session
      *            <code>ImapSession</code>, not null
      * @return <code>ImapResponseMessage</code>, not null
      */
-    abstract protected ImapResponseMessage doProcess(
-            final ImapMessage acceptableMessage, final ImapSession session);
+    abstract protected void doProcess(
+            final ImapMessage acceptableMessage, final Responder responder, final ImapSession session);
 }

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractImapRequestProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractImapRequestProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractImapRequestProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/AbstractImapRequestProcessor.java Mon Nov  5 00:46:09 2007
@@ -39,59 +39,62 @@
         super(next);
     }
 
-    protected final ImapResponseMessage doProcess(
-            ImapMessage acceptableMessage, ImapSession session) {
+    protected final void doProcess(
+            final ImapMessage acceptableMessage, final Responder responder, 
+            final ImapSession session) {
         final ImapRequest request = (ImapRequest) acceptableMessage;
-        final ImapResponseMessage result = process(request, session);
-        return result;
+        process(request, responder, session);
     }
 
-    protected final ImapResponseMessage process(ImapRequest message,
-            ImapSession session) {
-        ImapResponseMessage result;
+    protected final void process(final ImapRequest message, final Responder responder,
+            final ImapSession session) {
         final Logger logger = getLogger();
         final ImapCommand command = message.getCommand();
         final String tag = message.getTag();
         try {
-            result = doProcess(message, command, tag, session);
+            doProcess(message, command, tag, responder, session);
         } catch (MailboxException e) {
             if (logger != null) {
                 logger.debug("error processing command ", e);
             }
-            result = new CommandFailedResponse(command, e.getResponseCode(), e
+             final ImapResponseMessage response = new CommandFailedResponse(command, e.getResponseCode(), e
                     .getMessage(), tag);
+             responder.respond(response);
         } catch (AuthorizationException e) {
             if (logger != null) {
                 logger.debug("error processing command ", e);
             }
-            String msg = "Authorization error: Lacking permissions to perform requested operation.";
-            result = new CommandFailedResponse(command, null, msg, tag);
+            final String msg = "Authorization error: Lacking permissions to perform requested operation.";
+            final ImapResponseMessage response = new CommandFailedResponse(command, null, msg, tag);
+            responder.respond(response);
+            
         } catch (ProtocolException e) {
             if (logger != null) {
                 logger.debug("error processing command ", e);
             }
-            String msg = e.getMessage() + " Command should be '"
+            final String msg = e.getMessage() + " Command should be '"
                     + command.getExpectedMessage() + "'";
-            result = new ErrorResponse(msg, tag);
+            final ImapResponseMessage response = new ErrorResponse(msg, tag);
+            responder.respond(response);
+            
         }
-        return result;
     }
 
-    final ImapResponseMessage doProcess(final ImapRequest message,
-            final ImapCommand command, final String tag, ImapSession session)
+    final void doProcess(final ImapRequest message,
+            final ImapCommand command, final String tag, Responder responder, ImapSession session)
             throws MailboxException, AuthorizationException, ProtocolException {
-        ImapResponseMessage result;
         if (!command.validForState(session.getState())) {
-            result = new CommandFailedResponse(command,
+            ImapResponseMessage response = new CommandFailedResponse(command,
                     "Command not valid in this state.", tag);
+            responder.respond(response);
+            
         } else {
-            result = doProcess(message, session, tag, command);
+            doProcess(message, session, tag, command, responder);
         }
-        return result;
     }
 
-    protected abstract ImapResponseMessage doProcess(final ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected abstract void doProcess(final ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException;
     
 

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/ImapResponseMessageProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/ImapResponseMessageProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/ImapResponseMessageProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/ImapResponseMessageProcessor.java Mon Nov  5 00:46:09 2007
@@ -30,13 +30,13 @@
         super(next);
     }
 
-    protected ImapResponseMessage doProcess(ImapMessage acceptableMessage, ImapSession session) {
-        final ImapResponseMessage result = (ImapResponseMessage) acceptableMessage;
-        return result;
-    }
-
     protected boolean isAcceptable(ImapMessage message) {
         final boolean result = (message instanceof ImapResponseMessage);
         return result;
+    }
+
+    protected void doProcess(ImapMessage acceptableMessage, Responder responder, ImapSession session) {
+        final ImapResponseMessage result = (ImapResponseMessage) acceptableMessage;
+        responder.respond(result);
     }
 }

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/UnknownRequestImapProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/UnknownRequestImapProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/UnknownRequestImapProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/base/UnknownRequestImapProcessor.java Mon Nov  5 00:46:09 2007
@@ -45,4 +45,9 @@
         return result;
     }
 
+    public void process(ImapMessage message, Responder responder, ImapSession session) {
+        final ImapResponseMessage response = process(message, session);
+        responder.respond(response);
+    }
+
 }

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/AppendProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/AppendProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/AppendProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/AppendProcessor.java Mon Nov  5 00:46:09 2007
@@ -36,6 +36,7 @@
 import org.apache.james.api.imap.message.response.imap4rev1.StatusResponseFactory;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.AppendRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.processor.base.AbstractMailboxAwareProcessor;
@@ -61,13 +62,13 @@
         return (message instanceof AppendRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final AppendRequest request = (AppendRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(AppendRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/AuthenticateProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/AuthenticateProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/AuthenticateProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/AuthenticateProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.AuthenticateRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandFailedResponse;
 import org.apache.james.imapserver.processor.base.AbstractImapRequestProcessor;
@@ -42,13 +43,13 @@
         return (message instanceof AuthenticateRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final AuthenticateRequest request = (AuthenticateRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(AuthenticateRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CapabilityProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CapabilityProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CapabilityProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CapabilityProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.CapabilityRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CapabilityResponse;
 import org.apache.james.imapserver.processor.base.AbstractImapRequestProcessor;
@@ -45,13 +46,13 @@
         return (message instanceof CapabilityRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final CapabilityRequest request = (CapabilityRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(CapabilityRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CheckProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CheckProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CheckProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CheckProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.CheckRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.processor.base.AbstractImapRequestProcessor;
@@ -43,13 +44,13 @@
         return (message instanceof CheckRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final CheckRequest request = (CheckRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(CheckRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CloseProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CloseProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CloseProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CloseProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.CloseRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CloseResponse;
 import org.apache.james.imapserver.processor.base.AbstractImapRequestProcessor;
@@ -47,13 +48,13 @@
         return (message instanceof CloseRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final CloseRequest request = (CloseRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(CloseRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CopyProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CopyProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CopyProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CopyProcessor.java Mon Nov  5 00:46:09 2007
@@ -27,6 +27,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.CopyRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.processor.base.AbstractMailboxAwareProcessor;
@@ -51,13 +52,13 @@
         return (message instanceof CopyRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final CopyRequest request = (CopyRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(CopyRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CreateProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CreateProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CreateProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/CreateProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.CreateRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.processor.base.AbstractMailboxAwareProcessor;
@@ -47,13 +48,13 @@
         return (message instanceof CreateRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final CreateRequest request = (CreateRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(CreateRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/DeleteProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/DeleteProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/DeleteProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/DeleteProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.DeleteRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.processor.base.AbstractMailboxAwareProcessor;
@@ -47,13 +48,13 @@
         return (message instanceof DeleteRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final DeleteRequest request = (DeleteRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(DeleteRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ExamineProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ExamineProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ExamineProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ExamineProcessor.java Mon Nov  5 00:46:09 2007
@@ -27,6 +27,7 @@
 import org.apache.james.api.imap.message.response.imap4rev1.StatusResponseFactory;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.ExamineRequest;
 import org.apache.james.imapserver.processor.base.AuthorizationException;
 import org.apache.james.imapserver.store.MailboxException;
@@ -44,13 +45,13 @@
         return (message instanceof ExamineRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final ExamineRequest request = (ExamineRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(ExamineRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ExpungeProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ExpungeProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ExpungeProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ExpungeProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.ExpungeRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandFailedResponse;
@@ -50,13 +51,13 @@
         return (message instanceof ExpungeRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final ExpungeRequest request = (ExpungeRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(ExpungeRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/FetchProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/FetchProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/FetchProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/FetchProcessor.java Mon Nov  5 00:46:09 2007
@@ -42,6 +42,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.core.MimeMessageWrapper;
 import org.apache.james.imap.message.request.imap4rev1.FetchRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.FetchResponse;
@@ -70,13 +71,13 @@
         return (message instanceof FetchRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final FetchRequest request = (FetchRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(FetchRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ListProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ListProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ListProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/ListProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.ListRequest;
 import org.apache.james.imapserver.processor.base.AuthorizationException;
 import org.apache.james.imapserver.store.MailboxException;
@@ -43,13 +44,13 @@
         return (message instanceof ListRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final ListRequest request = (ListRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(ListRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LoginProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LoginProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LoginProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LoginProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.LoginRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandFailedResponse;
@@ -49,13 +50,13 @@
         return (message instanceof LoginRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final LoginRequest request = (LoginRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(LoginRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LogoutProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LogoutProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LogoutProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LogoutProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.LogoutRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.LogoutResponse;
 import org.apache.james.imapserver.processor.base.AbstractImapRequestProcessor;
@@ -42,13 +43,13 @@
         return (message instanceof LogoutRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final LogoutRequest request = (LogoutRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(LogoutRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LsubProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LsubProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LsubProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/LsubProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.LsubRequest;
 import org.apache.james.imapserver.processor.base.AuthorizationException;
 import org.apache.james.imapserver.store.MailboxException;
@@ -43,13 +44,13 @@
         return (message instanceof LsubRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final LsubRequest request = (LsubRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(LsubRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/NoopProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/NoopProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/NoopProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/NoopProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.NoopRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.processor.base.AbstractImapRequestProcessor;
@@ -43,13 +44,13 @@
         return (message instanceof NoopRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final NoopRequest request = (NoopRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(NoopRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/RenameProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/RenameProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/RenameProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/RenameProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.RenameRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.processor.base.AbstractMailboxAwareProcessor;
@@ -47,13 +48,13 @@
         return (message instanceof RenameRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final RenameRequest request = (RenameRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(RenameRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SearchProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SearchProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SearchProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SearchProcessor.java Mon Nov  5 00:46:09 2007
@@ -31,6 +31,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.SearchRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.SearchResponse;
 import org.apache.james.imapserver.processor.base.AbstractImapRequestProcessor;
@@ -53,13 +54,13 @@
         return (message instanceof SearchRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final SearchRequest request = (SearchRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(SearchRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SelectProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SelectProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SelectProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SelectProcessor.java Mon Nov  5 00:46:09 2007
@@ -27,6 +27,7 @@
 import org.apache.james.api.imap.message.response.imap4rev1.StatusResponseFactory;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.SelectRequest;
 import org.apache.james.imapserver.processor.base.AuthorizationException;
 import org.apache.james.imapserver.store.MailboxException;
@@ -44,13 +45,13 @@
         return (message instanceof SelectRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final SelectRequest request = (SelectRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(SelectRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/StatusProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/StatusProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/StatusProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/StatusProcessor.java Mon Nov  5 00:46:09 2007
@@ -29,6 +29,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.StatusRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.StatusResponse;
 import org.apache.james.imapserver.processor.base.AbstractMailboxAwareProcessor;
@@ -51,13 +52,13 @@
         return (message instanceof StatusRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final StatusRequest request = (StatusRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(StatusRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/StoreProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/StoreProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/StoreProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/StoreProcessor.java Mon Nov  5 00:46:09 2007
@@ -32,6 +32,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.StoreRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.StoreResponse;
 import org.apache.james.imapserver.processor.base.AbstractImapRequestProcessor;
@@ -54,13 +55,13 @@
         return (message instanceof StoreRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final StoreRequest request = (StoreRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(StoreRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SubscribeProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SubscribeProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SubscribeProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/SubscribeProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.SubscribeRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.processor.base.AbstractMailboxAwareProcessor;
@@ -47,13 +48,13 @@
         return (message instanceof SubscribeRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final SubscribeRequest request = (SubscribeRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(SubscribeRequest request,

Modified: james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/UnsubscribeProcessor.java
URL: http://svn.apache.org/viewvc/james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/UnsubscribeProcessor.java?rev=591913&r1=591912&r2=591913&view=diff
==============================================================================
--- james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/UnsubscribeProcessor.java (original)
+++ james/server/trunk/imap-mailbox-processor-function/src/main/java/org/apache/james/imapserver/processor/imap4rev1/UnsubscribeProcessor.java Mon Nov  5 00:46:09 2007
@@ -26,6 +26,7 @@
 import org.apache.james.api.imap.message.response.ImapResponseMessage;
 import org.apache.james.api.imap.process.ImapProcessor;
 import org.apache.james.api.imap.process.ImapSession;
+import org.apache.james.api.imap.process.ImapProcessor.Responder;
 import org.apache.james.imap.message.request.imap4rev1.UnsubscribeRequest;
 import org.apache.james.imap.message.response.imap4rev1.legacy.CommandCompleteResponse;
 import org.apache.james.imapserver.processor.base.AbstractMailboxAwareProcessor;
@@ -47,13 +48,13 @@
         return (message instanceof UnsubscribeRequest);
     }
 
-    protected ImapResponseMessage doProcess(ImapRequest message,
-            ImapSession session, String tag, ImapCommand command)
+    protected void doProcess(ImapRequest message,
+            ImapSession session, String tag, ImapCommand command, Responder responder)
             throws MailboxException, AuthorizationException, ProtocolException {
         final UnsubscribeRequest request = (UnsubscribeRequest) message;
         final ImapResponseMessage result = doProcess(request, session, tag,
                 command);
-        return result;
+        responder.respond(result);
     }
 
     private ImapResponseMessage doProcess(UnsubscribeRequest request,



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


Mime
View raw message