james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1051814 - in /james/server/trunk: container-spring/src/main/config/james/context/ mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/ mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/ mailetcon...
Date Wed, 22 Dec 2010 10:32:13 GMT
Author: norman
Date: Wed Dec 22 10:32:12 2010
New Revision: 1051814

URL: http://svn.apache.org/viewvc?rev=1051814&view=rev
Log:
Rename MailProcessorList* to CompositeMailProcessor* which better fit what it really does

Added:
    james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/CompositeMailProcessor.java
      - copied, changed from r1051470, james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/MailProcessorList.java
    james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/CompositeMailProcessorListener.java
      - copied, changed from r1051470, james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/MailProcessorListListener.java
    james/server/trunk/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/CamelCompositeMailProcessor.java
      - copied, changed from r1051767, james/server/trunk/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/CamelMailProcessorList.java
    james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/AbstractCompositeMailProcessor.java
      - copied, changed from r1051800, james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/AbstractMailProcessorList.java
    james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/jmx/JMXCompositeMailProcessorListener.java
      - copied, changed from r1051767, james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/jmx/JMXMailProcessorListListener.java
Removed:
    james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/MailProcessorList.java
    james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/MailProcessorListListener.java
    james/server/trunk/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/CamelMailProcessorList.java
    james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/AbstractMailProcessorList.java
    james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/jmx/JMXMailProcessorListListener.java
Modified:
    james/server/trunk/container-spring/src/main/config/james/context/james-server-context.xml
    james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/JamesMailSpooler.java
    james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/JamesMailetContext.java

Modified: james/server/trunk/container-spring/src/main/config/james/context/james-server-context.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/config/james/context/james-server-context.xml?rev=1051814&r1=1051813&r2=1051814&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/config/james/context/james-server-context.xml
(original)
+++ james/server/trunk/container-spring/src/main/config/james/context/james-server-context.xml
Wed Dec 22 10:32:12 2010
@@ -51,7 +51,7 @@
         <property name="logMappings">
             <map>
                 <entry key="mailetcontext" value="mailetcontainer"/>
-                <entry key="mailProcessor" value="mailetcontainer"/>
+                <entry key="mailprocessor" value="mailetcontainer"/>
                 <entry key="matcherloader" value="mailetcontainer"/>
             </map>
         </property>
@@ -102,7 +102,7 @@
     <bean id="configurationProvider" class="org.apache.james.container.spring.provider.configuration.ConfigurationProviderImpl">
         <property name="configurationMappings">
             <map>
-                <entry key="mailProcessor" value="mailetcontainer"/>
+                <entry key="mailprocessor" value="mailetcontainer"/>
                 <entry key="mailspooler" value="mailetcontainer"/>
                 <entry key="mailetcontext" value="mailetcontainer"/>
              </map>
@@ -184,7 +184,7 @@
     <!-- 
       Mailet Container Beans.
      -->
-    <bean id="mailProcessor" name="processorRoute" class="org.apache.james.mailetcontainer.camel.CamelMailProcessorList"/>
+    <bean id="mailprocessor" name="processorRoute" class="org.apache.james.mailetcontainer.camel.CamelCompositeMailProcessor"/>
     <!-- 
       mailcontext bean must be defined after mailProcessor 
       otherwise LogEnabled injection via LogEnabledBeanPostProcessor will not occur before


Copied: james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/CompositeMailProcessor.java
(from r1051470, james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/MailProcessorList.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/CompositeMailProcessor.java?p2=james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/CompositeMailProcessor.java&p1=james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/MailProcessorList.java&r1=1051470&r2=1051814&rev=1051814&view=diff
==============================================================================
--- james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/MailProcessorList.java
(original)
+++ james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/CompositeMailProcessor.java
Wed Dec 22 10:32:12 2010
@@ -25,7 +25,7 @@ import java.util.List;
  * {@link MailProcessor} which delegate the work to child {@link MailProcessor}
  * implementations
  */
-public interface MailProcessorList extends MailProcessor{
+public interface CompositeMailProcessor extends MailProcessor{
 
     /**
      * @return names of all configured processor
@@ -38,24 +38,24 @@ public interface MailProcessorList exten
     public MailProcessor getProcessor(String name);
 
     /**
-     * Add a {@link MailProcessorListListener} which will get triggered after a child {@link
MailProcessor} finish
+     * Add a {@link CompositeMailProcessorListener} which will get triggered after a child
{@link MailProcessor} finish
      * processing
      * 
      * @param listener
      */
-    public void addListener(MailProcessorListListener listener);
+    public void addListener(CompositeMailProcessorListener listener);
     
     /**
-     * Remove a {@link MailProcessorListListener}
+     * Remove a {@link CompositeMailProcessorListener}
      * 
      * @param listener
      */
-    public void removeListener(MailProcessorListListener listener);
+    public void removeListener(CompositeMailProcessorListener listener);
     
     /**
-     * Return a unmodifiable {@link List} of {@link MailProcessorListListener} which are
registered 
+     * Return a unmodifiable {@link List} of {@link CompositeMailProcessorListener} which
are registered 
      * 
      * @return listeners
      */
-    public List<MailProcessorListListener> getListeners();
+    public List<CompositeMailProcessorListener> getListeners();
 }

Copied: james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/CompositeMailProcessorListener.java
(from r1051470, james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/MailProcessorListListener.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/CompositeMailProcessorListener.java?p2=james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/CompositeMailProcessorListener.java&p1=james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/MailProcessorListListener.java&r1=1051470&r2=1051814&rev=1051814&view=diff
==============================================================================
--- james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/MailProcessorListListener.java
(original)
+++ james/server/trunk/mailetcontainer-api/src/main/java/org/apache/james/mailetcontainer/api/CompositeMailProcessorListener.java
Wed Dec 22 10:32:12 2010
@@ -21,10 +21,10 @@ package org.apache.james.mailetcontainer
 import javax.mail.MessagingException;
 
 /**
- * A Listener which will get called after {@link MailProcessor#service(org.apache.mailet.Mail)}
was called
+ * A Listener which will get called after {@link CompositeMailProcessor#service(org.apache.mailet.Mail)}
was called
  *
  */
-public interface MailProcessorListListener {
+public interface CompositeMailProcessorListener {
 
     /**
      * Get called after the processing via a {@link MailProcessor} was complete

Copied: james/server/trunk/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/CamelCompositeMailProcessor.java
(from r1051767, james/server/trunk/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/CamelMailProcessorList.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/CamelCompositeMailProcessor.java?p2=james/server/trunk/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/CamelCompositeMailProcessor.java&p1=james/server/trunk/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/CamelMailProcessorList.java&r1=1051767&r2=1051814&rev=1051814&view=diff
==============================================================================
--- james/server/trunk/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/CamelMailProcessorList.java
(original)
+++ james/server/trunk/mailetcontainer-camel/src/main/java/org/apache/james/mailetcontainer/camel/CamelCompositeMailProcessor.java
Wed Dec 22 10:32:12 2010
@@ -25,11 +25,11 @@ import javax.annotation.Resource;
 import org.apache.camel.CamelContext;
 import org.apache.camel.CamelContextAware;
 import org.apache.commons.configuration.HierarchicalConfiguration;
-import org.apache.james.mailetcontainer.api.MailProcessorList;
+import org.apache.james.mailetcontainer.api.CompositeMailProcessor;
 import org.apache.james.mailetcontainer.api.MailetContainer;
 import org.apache.james.mailetcontainer.api.MailetLoader;
 import org.apache.james.mailetcontainer.api.MatcherLoader;
-import org.apache.james.mailetcontainer.lib.AbstractMailProcessorList;
+import org.apache.james.mailetcontainer.lib.AbstractCompositeMailProcessor;
 import org.apache.james.mailetcontainer.lib.matchers.CompositeMatcher;
 import org.apache.mailet.Mail;
 import org.apache.mailet.Mailet;
@@ -39,13 +39,13 @@ import org.apache.mailet.Matcher;
 /**
  * Build up the Camel Routes by parsing the mailetcontainer.xml configuration file. 
  * 
- * It also offer the {@link MailProcessorList} implementation which allow to inject {@link
Mail} into the routes.
+ * It also offer the {@link CompositeMailProcessor} implementation which allow to inject
{@link Mail} into the routes.
  *
  * Beside the basic {@link Mailet} / {@link Matcher} support this implementation also supports
{@link CompositeMatcher} implementations.
  * See JAMES-948 
  * 
  */
-public class CamelMailProcessorList extends AbstractMailProcessorList implements CamelContextAware{
+public class CamelCompositeMailProcessor extends AbstractCompositeMailProcessor implements
CamelContextAware{
 
     private CamelContext camelContext;
     private MailetContext mailetContext;

Copied: james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/AbstractCompositeMailProcessor.java
(from r1051800, james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/AbstractMailProcessorList.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/AbstractCompositeMailProcessor.java?p2=james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/AbstractCompositeMailProcessor.java&p1=james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/AbstractMailProcessorList.java&r1=1051800&r2=1051814&rev=1051814&view=diff
==============================================================================
--- james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/AbstractMailProcessorList.java
(original)
+++ james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/AbstractCompositeMailProcessor.java
Wed Dec 22 10:32:12 2010
@@ -36,26 +36,26 @@ import org.apache.james.lifecycle.api.Co
 import org.apache.james.lifecycle.api.LifecycleUtil;
 import org.apache.james.lifecycle.api.LogEnabled;
 import org.apache.james.mailetcontainer.api.MailProcessor;
-import org.apache.james.mailetcontainer.api.MailProcessorList;
-import org.apache.james.mailetcontainer.api.MailProcessorListListener;
+import org.apache.james.mailetcontainer.api.CompositeMailProcessor;
+import org.apache.james.mailetcontainer.api.CompositeMailProcessorListener;
 import org.apache.james.mailetcontainer.api.MailetContainer;
 import org.apache.james.mailetcontainer.api.jmx.ProcessorManagementMBean;
-import org.apache.james.mailetcontainer.lib.jmx.JMXMailProcessorListListener;
+import org.apache.james.mailetcontainer.lib.jmx.JMXCompositeMailProcessorListener;
 import org.apache.mailet.Mail;
 
 /**
- * Abstract base class for {@link MailProcessorList} which service the {@link Mail} with
a {@link MailetContainer} instances
+ * Abstract base class for {@link CompositeMailProcessor} which service the {@link Mail}
with a {@link MailetContainer} instances
  * 
  *
  */
-public abstract class AbstractMailProcessorList implements MailProcessorList, Configurable,
LogEnabled, ProcessorManagementMBean{
+public abstract class AbstractCompositeMailProcessor implements CompositeMailProcessor, Configurable,
LogEnabled, ProcessorManagementMBean{
 
-    private List<MailProcessorListListener> listeners = Collections.synchronizedList(new
ArrayList<MailProcessorListListener>());
+    private List<CompositeMailProcessorListener> listeners = Collections.synchronizedList(new
ArrayList<CompositeMailProcessorListener>());
     private final Map<String,MailProcessor> processors = new HashMap<String,MailProcessor>();
     protected Log logger;
     protected HierarchicalConfiguration config;
 
-    private JMXMailProcessorListListener jmxListener;
+    private JMXCompositeMailProcessorListener jmxListener;
     private boolean enableJmx = true;
     
     /*
@@ -67,27 +67,30 @@ public abstract class AbstractMailProces
 
     }
     
+
     /*
      * (non-Javadoc)
-     * @see org.apache.james.mailetcontainer.api.MailProcessorList#addListener(org.apache.james.mailetcontainer.api.MailProcessorListListener)
+     * @see org.apache.james.mailetcontainer.api.CompositeMailProcessor#addListener(org.apache.james.mailetcontainer.api.CompositeMailProcessorListener)
      */
-    public void addListener(MailProcessorListListener listener) {
+    public void addListener(CompositeMailProcessorListener listener) {
         listeners.add(listener);
     }
     
+
     /*
      * (non-Javadoc)
-     * @see org.apache.james.mailetcontainer.api.MailProcessorList#getListeners()
+     * @see org.apache.james.mailetcontainer.api.CompositeMailProcessor#getListeners()
      */
-    public List<MailProcessorListListener> getListeners() {
+    public List<CompositeMailProcessorListener> getListeners() {
         return listeners;
     }
     
+
     /*
      * (non-Javadoc)
-     * @see org.apache.james.mailetcontainer.api.MailProcessorList#removeListener(org.apache.james.mailetcontainer.api.MailProcessorListListener)
+     * @see org.apache.james.mailetcontainer.api.CompositeMailProcessor#removeListener(org.apache.james.mailetcontainer.api.CompositeMailProcessorListener)
      */
-    public void removeListener(MailProcessorListListener listener) {
+    public void removeListener(CompositeMailProcessorListener listener) {
         listeners.remove(listener);
     }
     
@@ -131,7 +134,7 @@ public abstract class AbstractMailProces
             } finally {
                 long end = System.currentTimeMillis() - start;
                 for (int i = 0; i < listeners.size(); i++) {
-                    MailProcessorListListener listener = listeners.get(i);
+                    CompositeMailProcessorListener listener = listeners.get(i);
                     
                     listener.afterProcessor(processor, mail.getName(), end, ex);
                 } 
@@ -200,7 +203,7 @@ public abstract class AbstractMailProces
         
         
         if (enableJmx) {
-            this.jmxListener = new JMXMailProcessorListListener(this);
+            this.jmxListener = new JMXCompositeMailProcessorListener(this);
             addListener(jmxListener);
         }
         

Modified: james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/JamesMailSpooler.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/JamesMailSpooler.java?rev=1051814&r1=1051813&r2=1051814&view=diff
==============================================================================
--- james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/JamesMailSpooler.java
(original)
+++ james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/JamesMailSpooler.java
Wed Dec 22 10:32:12 2010
@@ -96,7 +96,7 @@ public class JamesMailSpooler implements
         this.queueFactory = queueFactory;
     }
 
-    @Resource(name="mailProcessor")
+    @Resource(name="mailprocessor")
     public void setMailProcessor(MailProcessor mailProcessor) {
         this.mailProcessor = mailProcessor;
     }

Modified: james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/JamesMailetContext.java
URL: http://svn.apache.org/viewvc/james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/JamesMailetContext.java?rev=1051814&r1=1051813&r2=1051814&view=diff
==============================================================================
--- james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/JamesMailetContext.java
(original)
+++ james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/JamesMailetContext.java
Wed Dec 22 10:32:12 2010
@@ -76,7 +76,7 @@ public class JamesMailetContext implemen
     private MailAddress postmaster;
 
 
-    @Resource(name="mailProcessor")
+    @Resource(name="mailprocessor")
     public void setMailProcessor(MailProcessor processorList) {
         this.processorList = processorList;
     }

Copied: james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/jmx/JMXCompositeMailProcessorListener.java
(from r1051767, james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/jmx/JMXMailProcessorListListener.java)
URL: http://svn.apache.org/viewvc/james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/jmx/JMXCompositeMailProcessorListener.java?p2=james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/jmx/JMXCompositeMailProcessorListener.java&p1=james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/jmx/JMXMailProcessorListListener.java&r1=1051767&r2=1051814&rev=1051814&view=diff
==============================================================================
--- james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/jmx/JMXMailProcessorListListener.java
(original)
+++ james/server/trunk/mailetcontainer-library/src/main/java/org/apache/james/mailetcontainer/lib/jmx/JMXCompositeMailProcessorListener.java
Wed Dec 22 10:32:12 2010
@@ -32,21 +32,21 @@ import javax.management.ObjectName;
 
 import org.apache.james.lifecycle.api.Disposable;
 import org.apache.james.mailetcontainer.api.MailProcessor;
-import org.apache.james.mailetcontainer.api.MailProcessorList;
-import org.apache.james.mailetcontainer.api.MailProcessorListListener;
+import org.apache.james.mailetcontainer.api.CompositeMailProcessor;
+import org.apache.james.mailetcontainer.api.CompositeMailProcessorListener;
 
 /**
- * {@link MailProcessorListListener} implementation which register MBeans for its child {@link
MailProcessor} 
+ * {@link CompositeMailProcessorListener} implementation which register MBeans for its child
{@link MailProcessor} 
  * and keep track of the stats
  *
  */
-public class JMXMailProcessorListListener implements MailProcessorListListener, Disposable{
+public class JMXCompositeMailProcessorListener implements CompositeMailProcessorListener,
Disposable{
 
-    private MailProcessorList mList;
+    private CompositeMailProcessor mList;
     private MBeanServer mbeanserver;
     private List<ObjectName> mbeans = new ArrayList<ObjectName>();
     private Map<MailProcessor, MailProcessorManagement> mMap = new HashMap<MailProcessor,
MailProcessorManagement>();
-    public JMXMailProcessorListListener(MailProcessorList mList) throws MalformedObjectNameException,
JMException {
+    public JMXCompositeMailProcessorListener(CompositeMailProcessor mList) throws MalformedObjectNameException,
JMException {
         this.mList = mList;
         
         mbeanserver = ManagementFactory.getPlatformMBeanServer();



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