james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r756584 - in /james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor: ./ base/ fetch/
Date Fri, 20 Mar 2009 16:27:21 GMT
Author: rdonkin
Date: Fri Mar 20 16:27:20 2009
New Revision: 756584

URL: http://svn.apache.org/viewvc?rev=756584&view=rev
Log:
Use session log IMAP-75 https://issues.apache.org/jira/browse/IMAP-75

Modified:
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CopyProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CreateProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LSubProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ListProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LoginProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/RenameProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SubscribeProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/UnsubscribeProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java
Fri Mar 20 16:27:20 2009
@@ -83,8 +83,8 @@
     }
 
     protected void no(final ImapCommand command, final String tag,
-            final Responder responder, final MessagingException e) {
-        final Log logger = getLog();
+            final Responder responder, final MessagingException e, ImapSession session) {
+        final Log logger = session.getLog();
         final ImapResponseMessage response;
         if (e instanceof MailboxExistsException) {
             response = factory.taggedNo(tag, command,
@@ -128,7 +128,7 @@
             boolean omitExpunged, boolean useUid) {
         final SelectedMailbox selected = session.getSelected();
         if (selected == null) {
-            getLog().debug("No mailbox selected");
+            session.getLog().debug("No mailbox selected");
         } else {
             unsolicitedResponses(session, responder, selected, omitExpunged, useUid);
         }
@@ -185,7 +185,7 @@
                 }
             }
         } catch (MessagingException e) {
-            handleResponseException(responder, e, HumanReadableTextKey.FAILURE_TO_LOAD_FLAGS);
+            handleResponseException(responder, e, HumanReadableTextKey.FAILURE_TO_LOAD_FLAGS,
session);
         }
     }
 
@@ -239,14 +239,14 @@
             final ExistsResponse response = new ExistsResponse(messageCount);
             responder.respond(response);
         } catch (MailboxException e) {
-            handleResponseException(responder, e, HumanReadableTextKey.FAILURE_EXISTS_COUNT);
+            handleResponseException(responder, e, HumanReadableTextKey.FAILURE_EXISTS_COUNT,
session);
         }
     }
 
     private void handleResponseException(final ImapProcessor.Responder responder,
-            MessagingException e, final HumanReadableTextKey message) {
-        getLog().info(message);
-        getLog().debug(message, e);
+            MessagingException e, final HumanReadableTextKey message, ImapSession session)
{
+        session.getLog().info(message);
+        session.getLog().debug(message, e);
         // TODO: consider whether error message should be passed to the user
         final StatusResponse response = factory.untaggedNo(message);;
         responder.respond(response);

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java
Fri Mar 20 16:27:20 2009
@@ -86,7 +86,7 @@
             responder.respond(statusResponseFactory.taggedNo(tag, command,
                     HumanReadableTextKey.FAILURE_NO_SUCH_MAILBOX));
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AppendProcessor.java
Fri Mar 20 16:27:20 2009
@@ -76,7 +76,7 @@
             // assume that
             // TODO: improved API should communicate when this operation
             // TODO: fails whether the mailbox exists
-            Log logger = getLog();
+            Log logger = session.getLog();
             if (logger.isInfoEnabled()) {
                 logger.info(mme.getMessage());
             }
@@ -108,7 +108,7 @@
             okComplete(command, tag, responder);
         } catch (MailboxException e) {
             // TODO why not TRYCREATE?
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AuthenticateProcessor.java
Fri Mar 20 16:27:20 2009
@@ -44,7 +44,7 @@
             String tag, ImapCommand command, Responder responder) {
         final AuthenticateRequest request = (AuthenticateRequest) message;
         final String authType = request.getAuthType();
-        getLog()
+        session.getLog()
                 .info("Unsupported authentication mechanism '" + authType + "'");
         no(command, tag, responder,
                 HumanReadableTextKey.UNSUPPORTED_AUTHENTICATION_MECHANISM);

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
Fri Mar 20 16:27:20 2009
@@ -63,7 +63,7 @@
                     okComplete(command, tag, responder);
             }
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CopyProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CopyProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CopyProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CopyProcessor.java
Fri Mar 20 16:27:20 2009
@@ -90,7 +90,7 @@
                 okComplete(command, tag, responder);
             }
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CreateProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CreateProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CreateProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CreateProcessor.java
Fri Mar 20 16:27:20 2009
@@ -54,7 +54,7 @@
             unsolicitedResponses(session, responder, false);
             okComplete(command, tag, responder);
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/DeleteProcessor.java
Fri Mar 20 16:27:20 2009
@@ -61,7 +61,7 @@
             okComplete(command, tag, responder);
 
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ExpungeProcessor.java
Fri Mar 20 16:27:20 2009
@@ -71,7 +71,7 @@
                 okComplete(command, tag, responder);
             }
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LSubProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LSubProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LSubProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LSubProcessor.java
Fri Mar 20 16:27:20 2009
@@ -69,7 +69,7 @@
             okComplete(command, tag, responder);
 
         } catch (SubscriptionException e) {
-            getLog().debug("Subscription failed", e);
+            session.getLog().debug("Subscription failed", e);
             final HumanReadableTextKey exceptionKey = e.getKey();
             final HumanReadableTextKey displayTextKey;
             if (exceptionKey == null) {
@@ -79,7 +79,7 @@
             }
             no(command, tag, responder, displayTextKey);
         } catch (MailboxException e) {
-            getLog().debug("Subscription failed", e);
+            session.getLog().debug("Subscription failed", e);
             final HumanReadableTextKey displayTextKey = HumanReadableTextKey.GENERIC_LSUB_FAILURE;
             no(command, tag, responder, displayTextKey);
         }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ListProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ListProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ListProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/ListProcessor.java
Fri Mar 20 16:27:20 2009
@@ -140,7 +140,7 @@
 
             okComplete(command, tag, responder);
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LoginProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LoginProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LoginProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/LoginProcessor.java
Fri Mar 20 16:27:20 2009
@@ -70,13 +70,13 @@
                 ImapSessionUtils.setUserName(session, userid);
                 final String inboxName = buildFullName(session, MailboxManager.INBOX);
                 if (mailboxManager.mailboxExists(inboxName)) {
-                    getLog().debug("INBOX exists. No need to create it.");
+                    session.getLog().debug("INBOX exists. No need to create it.");
                 } else {
                     try {
-                        getLog().debug("INBOX does not exist. Creating it.");
+                        session.getLog().debug("INBOX does not exist. Creating it.");
                         mailboxManager.createMailbox(inboxName);
                     } catch (MailboxExistsException e) {
-                        getLog().debug("Mailbox created by concurrent call. Safe to ignore
this exception.");
+                        session.getLog().debug("Mailbox created by concurrent call. Safe
to ignore this exception.");
                     }
                 }
                 okComplete(command, tag, responder);
@@ -95,13 +95,13 @@
                     no(command, tag, responder,
                             HumanReadableTextKey.INVALID_LOGIN);
                 } else {
-                    getLog().info("Too many authentication failures. Closing connection.");
+                    session.getLog().info("Too many authentication failures. Closing connection.");
                     bye(responder, HumanReadableTextKey.TOO_MANY_FAILURES);
                     session.logout();
                 }
             }
         } catch (MailboxException e) {
-            getLog().debug("Login failed", e);
+            session.getLog().debug("Login failed", e);
             final HumanReadableTextKey displayTextKey = HumanReadableTextKey.INVALID_LOGIN;
             no(command, tag, responder, displayTextKey);
         }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/RenameProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/RenameProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/RenameProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/RenameProcessor.java
Fri Mar 20 16:27:20 2009
@@ -66,7 +66,7 @@
             no(command, tag, responder,
                     HumanReadableTextKey.FAILURE_NO_SUCH_MAILBOX);
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SearchProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SearchProcessor.java
Fri Mar 20 16:27:20 2009
@@ -77,7 +77,7 @@
             unsolicitedResponses(session, responder, omitExpunged, useUids);
             okComplete(command, tag, responder);
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 
@@ -217,7 +217,7 @@
             case SearchKey.TYPE_UNSEEN:
                 return SearchQuery.flagIsUnSet(Flag.SEEN);
             default:
-                getLog().warn("Ignoring unknown search key.");
+                session.getLog().warn("Ignoring unknown search key.");
                 return SearchQuery.all();
         }
     }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StatusProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StatusProcessor.java
Fri Mar 20 16:27:20 2009
@@ -53,7 +53,7 @@
         final StatusRequest request = (StatusRequest) message;
         final String mailboxName = request.getMailboxName();
         final StatusDataItems statusDataItems = request.getStatusDataItems();
-        final Log logger = getLog();
+        final Log logger = session.getLog();
         final MailboxSession mailboxSession = ImapSessionUtils
                 .getMailboxSession(session);
 
@@ -84,7 +84,7 @@
             okComplete(command, tag, responder);
 
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java
Fri Mar 20 16:27:20 2009
@@ -118,7 +118,7 @@
             unsolicitedResponses(session, responder, omitExpunged, useUids);
             okComplete(command, tag, responder);
         } catch (MailboxException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         }
     }
 }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SubscribeProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SubscribeProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SubscribeProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SubscribeProcessor.java
Fri Mar 20 16:27:20 2009
@@ -58,7 +58,7 @@
             okComplete(command, tag, responder);
 
         } catch (SubscriptionException e) {
-            getLog().debug("Subscription failed", e);
+            session.getLog().debug("Subscription failed", e);
             unsolicitedResponses(session, responder, false);
 
             final HumanReadableTextKey exceptionKey = e.getKey();
@@ -70,7 +70,7 @@
             }
             no(command, tag, responder, displayTextKey);
         } catch (MailboxException e) {
-            getLog().debug("Subscription failed", e);
+            session.getLog().debug("Subscription failed", e);
             unsolicitedResponses(session, responder, false);
 
             final HumanReadableTextKey displayTextKey = HumanReadableTextKey.GENERIC_SUBSCRIPTION_FAILURE;

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/UnsubscribeProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/UnsubscribeProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/UnsubscribeProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/UnsubscribeProcessor.java
Fri Mar 20 16:27:20 2009
@@ -58,7 +58,7 @@
             okComplete(command, tag, responder);
 
         } catch (SubscriptionException e) {
-            getLog().debug("Subscription failed", e);
+            session.getLog().debug("Subscription failed", e);
             unsolicitedResponses(session, responder, false);
 
             final HumanReadableTextKey exceptionKey = e.getKey();
@@ -70,7 +70,7 @@
             }
             no(command, tag, responder, displayTextKey);
         } catch (MailboxException e) {
-            getLog().debug("Subscription failed", e);
+            session.getLog().debug("Subscription failed", e);
             unsolicitedResponses(session, responder, false);
 
             final HumanReadableTextKey displayTextKey = HumanReadableTextKey.GENERIC_SUBSCRIPTION_FAILURE;

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/AbstractChainedProcessor.java
Fri Mar 20 16:27:20 2009
@@ -19,14 +19,11 @@
 
 package org.apache.james.imap.processor.base;
 
-import org.apache.commons.logging.Log;
-import org.apache.james.imap.api.AbstractLogEnabled;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.process.ImapProcessor;
 import org.apache.james.imap.api.process.ImapSession;
 
-abstract public class AbstractChainedProcessor extends AbstractLogEnabled
-        implements ImapProcessor {
+abstract public class AbstractChainedProcessor implements ImapProcessor {
 
     private final ImapProcessor next;
 
@@ -40,11 +37,6 @@
         this.next = next;
     }
 
-    public void setLog(Log logger) {
-        super.setLog(logger);
-        setupLogger(next);
-    }
-
     public void process(ImapMessage message, Responder responder,
             ImapSession session) {
         final boolean isAcceptable = isAcceptable(message);

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/UnknownRequestProcessor.java
Fri Mar 20 16:27:20 2009
@@ -20,7 +20,6 @@
 package org.apache.james.imap.processor.base;
 
 import org.apache.commons.logging.Log;
-import org.apache.james.imap.api.AbstractLogEnabled;
 import org.apache.james.imap.api.ImapCommand;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.display.HumanReadableTextKey;
@@ -30,8 +29,7 @@
 import org.apache.james.imap.api.process.ImapProcessor;
 import org.apache.james.imap.api.process.ImapSession;
 
-public class UnknownRequestProcessor extends AbstractLogEnabled implements
-        ImapProcessor {
+public class UnknownRequestProcessor implements ImapProcessor {
 
     private final StatusResponseFactory factory;
 
@@ -41,7 +39,7 @@
     }
 
     public ImapResponseMessage process(ImapMessage message, ImapSession session) {
-        Log logger = getLog();
+        Log logger = session.getLog();
         if (logger != null && logger.isDebugEnabled()) {
             logger.debug("Unknown message: " + message);
         }

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java?rev=756584&r1=756583&r2=756584&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
Fri Mar 20 16:27:20 2009
@@ -72,7 +72,7 @@
             final Mailbox mailbox = getSelectedMailbox(session);
             for (int i = 0; i < idSet.length; i++) {
                 final FetchResponseBuilder builder = new FetchResponseBuilder(
-                        new EnvelopeBuilder(getLog()));
+                        new EnvelopeBuilder(session.getLog()));
                 final long highVal;
                 final long lowVal;
                 if (useUids) {
@@ -102,7 +102,7 @@
             no(command, tag, responder,
                     HumanReadableTextKey.UNSUPPORTED_SEARCH_CRITERIA);
         } catch (MessagingException e) {
-            no(command, tag, responder, e);
+            no(command, tag, responder, e, session);
         } catch (ParseException e) {
             no(command, tag, responder, HumanReadableTextKey.FAILURE_MAIL_PARSE);
         }



---------------------------------------------------------------------
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