james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r756690 - in /james/protocols/imap/trunk: message/src/main/java/org/apache/james/imap/message/request/ processor/src/main/java/org/apache/james/imap/processor/base/ seda/src/main/java/org/apache/james/imap/main/
Date Fri, 20 Mar 2009 17:55:18 GMT
Author: rdonkin
Date: Fri Mar 20 17:55:16 2009
New Revision: 756690

URL: http://svn.apache.org/viewvc?rev=756690&view=rev
Log:
AbstractLogEnabled not used. IMAP-75 https://issues.apache.org/jira/browse/IMAP-75

Modified:
    james/protocols/imap/trunk/message/src/main/java/org/apache/james/imap/message/request/AbstractImapRequest.java
    james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
    james/protocols/imap/trunk/seda/src/main/java/org/apache/james/imap/main/ImapRequestHandler.java
    james/protocols/imap/trunk/seda/src/main/java/org/apache/james/imap/main/ImapSessionImpl.java

Modified: james/protocols/imap/trunk/message/src/main/java/org/apache/james/imap/message/request/AbstractImapRequest.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/message/src/main/java/org/apache/james/imap/message/request/AbstractImapRequest.java?rev=756690&r1=756689&r2=756690&view=diff
==============================================================================
--- james/protocols/imap/trunk/message/src/main/java/org/apache/james/imap/message/request/AbstractImapRequest.java
(original)
+++ james/protocols/imap/trunk/message/src/main/java/org/apache/james/imap/message/request/AbstractImapRequest.java
Fri Mar 20 17:55:16 2009
@@ -18,13 +18,11 @@
  ****************************************************************/
 package org.apache.james.imap.message.request;
 
-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.message.request.ImapRequest;
 
-abstract public class AbstractImapRequest extends AbstractLogEnabled implements
-        ImapMessage, ImapRequest {
+abstract public class AbstractImapRequest implements ImapMessage, ImapRequest {
 
     private final String tag;
 

Modified: james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java?rev=756690&r1=756689&r2=756690&view=diff
==============================================================================
--- james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
(original)
+++ james/protocols/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/base/SelectedMailboxImpl.java
Fri Mar 20 17:55:16 2009
@@ -25,14 +25,12 @@
 import java.util.Set;
 import java.util.TreeSet;
 
-import org.apache.james.imap.api.AbstractLogEnabled;
 import org.apache.james.imap.api.process.SelectedMailbox;
 import org.apache.james.imap.mailbox.MailboxException;
 import org.apache.james.imap.mailbox.MailboxManager;
 import org.apache.james.imap.mailbox.MailboxSession;
 
-public class SelectedMailboxImpl extends AbstractLogEnabled implements
-        SelectedMailbox {
+public class SelectedMailboxImpl implements SelectedMailbox {
 
     private final MailboxEventAnalyser events;
 

Modified: james/protocols/imap/trunk/seda/src/main/java/org/apache/james/imap/main/ImapRequestHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/seda/src/main/java/org/apache/james/imap/main/ImapRequestHandler.java?rev=756690&r1=756689&r2=756690&view=diff
==============================================================================
--- james/protocols/imap/trunk/seda/src/main/java/org/apache/james/imap/main/ImapRequestHandler.java
(original)
+++ james/protocols/imap/trunk/seda/src/main/java/org/apache/james/imap/main/ImapRequestHandler.java
Fri Mar 20 17:55:16 2009
@@ -24,7 +24,7 @@
 import java.io.OutputStream;
 
 import org.apache.commons.logging.Log;
-import org.apache.james.imap.api.AbstractLogEnabled;
+import org.apache.commons.logging.LogFactory;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.ImapSessionState;
 import org.apache.james.imap.api.message.response.ImapResponseMessage;
@@ -42,7 +42,7 @@
 /**
  * @version $Revision: 109034 $
  */
-public final class ImapRequestHandler extends AbstractLogEnabled {
+public final class ImapRequestHandler  {
 
     private static final byte[] ABANDON_SIGNOFF = { '*', ' ', 'B', 'Y', 'E',
             ' ', 'A', 'b', 'a', 'n', 'd', 'o', 'n', 'e', 'd', '\r', '\n' };
@@ -52,6 +52,11 @@
             'i', 'l', 'b', 'o', 'x', ' ', 'h', 'a', 's', ' ', 'b', 'e', 'e',
             'n', ' ', 'd', 'e', 'l', 'e', 't', 'e', 'd', '\r', '\n' };
 
+    private static final Log IMAP_LOG = LogFactory.getLog("org.apache.james.imap");
+    
+    private Log log = IMAP_LOG;
+
+    
     private final ImapDecoder decoder;
 
     private final ImapProcessor processor;
@@ -65,11 +70,12 @@
         this.encoder = encoder;
     }
 
-    /**
-     * @see org.apache.avalon.framework.logger.AbstractLogEnabled#enableLogging(org.apache.avalon.framework.logger.Logger)
-     */
-    public void setLog(Log logger) {
-        super.setLog(logger);
+    public Log getLog() {
+        return log;
+    }
+
+    public void setLog(Log log) {
+        this.log = log;
     }
 
     /**
@@ -92,7 +98,6 @@
         } else {
             ImapRequestLineReader request = new ImapRequestLineReader(input,
                     output);
-            setupLogger(request);
 
             final Log logger = getLog();
             try {

Modified: james/protocols/imap/trunk/seda/src/main/java/org/apache/james/imap/main/ImapSessionImpl.java
URL: http://svn.apache.org/viewvc/james/protocols/imap/trunk/seda/src/main/java/org/apache/james/imap/main/ImapSessionImpl.java?rev=756690&r1=756689&r2=756690&view=diff
==============================================================================
--- james/protocols/imap/trunk/seda/src/main/java/org/apache/james/imap/main/ImapSessionImpl.java
(original)
+++ james/protocols/imap/trunk/seda/src/main/java/org/apache/james/imap/main/ImapSessionImpl.java
Fri Mar 20 17:55:16 2009
@@ -22,7 +22,8 @@
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
-import org.apache.james.imap.api.AbstractLogEnabled;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.james.imap.api.ImapConstants;
 import org.apache.james.imap.api.ImapSessionState;
 import org.apache.james.imap.api.process.ImapSession;
@@ -31,18 +32,30 @@
 /**
  * Implements a session.
  */
-public final class ImapSessionImpl extends AbstractLogEnabled implements
-        ImapSession, ImapConstants {
+public final class ImapSessionImpl implements ImapSession, ImapConstants {
+    private static final Log IMAP_LOG = LogFactory.getLog("org.apache.james.imap");
+
+    private Log log = IMAP_LOG;
+    
     private ImapSessionState state = ImapSessionState.NON_AUTHENTICATED;
 
     private SelectedMailbox selectedMailbox = null;
-
+    
     private final Map<String, Object> attributesByKey;
 
     public ImapSessionImpl() {
         this.attributesByKey = new ConcurrentHashMap<String, Object>();
     }
 
+
+    public Log getLog() {
+        return log;
+    }
+    
+    public void setLog(Log log) {
+        this.log = log;
+    }
+    
     public void logout() {
         closeMailbox();
         state = ImapSessionState.LOGOUT;
@@ -58,7 +71,6 @@
     }
 
     public void selected(SelectedMailbox mailbox) {
-        setupLogger(mailbox);
         this.state = ImapSessionState.SELECTED;
         closeMailbox();
         this.selectedMailbox = mailbox;



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