james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1221277 - in /james/protocols/trunk: api/src/main/java/org/apache/james/protocols/api/ lmtp/src/main/java/org/apache/james/protocols/lmtp/ pop3/.settings/ pop3/src/main/java/org/apache/james/protocols/pop3/ pop3/src/main/java/org/apache/ja...
Date Tue, 20 Dec 2011 14:26:16 GMT
Author: norman
Date: Tue Dec 20 14:26:15 2011
New Revision: 1221277

URL: http://svn.apache.org/viewvc?rev=1221277&view=rev
Log:
Expose SMTPConfiguration via SMTPSession. see PROTOCOLS-60

Added:
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolConfiguration.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolConfigurationImpl.java
    james/protocols/trunk/pop3/.settings/
    james/protocols/trunk/pop3/.settings/org.eclipse.jdt.core.prefs
    james/protocols/trunk/pop3/.settings/org.eclipse.jdt.ui.prefs
Removed:
    james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/WelcomeMessageHandler.java
    james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3ConfigurationImpl.java
Modified:
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolImpl.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSession.java
    james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSessionImpl.java
    james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPConfiguration.java
    james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPConfigurationImpl.java
    james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java
    james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPReceivedDataLineFilter.java
    james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LhloCmdHandler.java
    james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Configuration.java
    james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Protocol.java
    james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Session.java
    james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3SessionImpl.java
    james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/core/WelcomeMessageHandler.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPConfiguration.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPConfigurationImpl.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocol.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPSession.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPSessionImpl.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/ReceivedDataLineFilter.java
    james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/WelcomeMessageHandler.java

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolConfiguration.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolConfiguration.java?rev=1221277&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolConfiguration.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolConfiguration.java Tue Dec 20 14:26:15 2011
@@ -0,0 +1,46 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.protocols.api;
+
+public interface ProtocolConfiguration {
+
+    
+    /**
+     * Return the Greeting which should used.
+     * 
+     * @return the greeting
+     */
+    String getGreeting();
+    
+    /**
+     * Return the name of the software.
+     * 
+     * @return softwareName
+     */
+    String getSoftwareName();
+    
+    /**
+     * Returns the service wide hello name
+     *
+     * @return the hello name
+     */
+    String getHelloName();
+    
+}

Added: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolConfigurationImpl.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolConfigurationImpl.java?rev=1221277&view=auto
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolConfigurationImpl.java (added)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolConfigurationImpl.java Tue Dec 20 14:26:15 2011
@@ -0,0 +1,65 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.protocols.api;
+
+
+public class ProtocolConfigurationImpl implements ProtocolConfiguration {
+    private String greeting;
+    private String softwareName = "JAMES Protocols Server";
+    private String helloName = "localhost";
+    
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.apache.james.protocols.pop3.POP3Configuration#getHelloName()
+     */
+    public String getHelloName() {
+        return helloName;
+    }
+    
+    public void setHelloName(String helloName) {
+        this.helloName = helloName;
+    }
+    
+    /*
+     * (non-Javadoc)
+     * @see org.apache.james.protocols.api.ProtocolConfiguration#getGreeting()
+     */
+    public String getGreeting() {
+        return greeting;
+    }
+    
+    public void setGreeting(String greeting) {
+        this.greeting = greeting;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see org.apache.james.protocols.api.ProtocolConfiguration#getSoftwareName()
+     */
+    public String getSoftwareName() {
+        return softwareName;
+    }
+    
+    public void setSoftwareName(String softwareName) {
+        this.softwareName = softwareName;
+    }
+
+}

Modified: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolImpl.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolImpl.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolImpl.java (original)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolImpl.java Tue Dec 20 14:26:15 2011
@@ -30,9 +30,11 @@ import org.slf4j.LoggerFactory;
 public class ProtocolImpl implements Protocol{
     protected final static Logger logger = LoggerFactory.getLogger(ProtocolImpl.class);
     private final ProtocolHandlerChain chain;
+    protected final ProtocolConfiguration config;
 
-    public ProtocolImpl(ProtocolHandlerChain chain) {
+    public ProtocolImpl(ProtocolHandlerChain chain, ProtocolConfiguration config) {
         this.chain = chain;
+        this.config = config;
     }
     
     /*
@@ -48,7 +50,7 @@ public class ProtocolImpl implements Pro
      * @see org.apache.james.protocols.api.Protocol#newSession(org.apache.james.protocols.api.ProtocolTransport)
      */
     public ProtocolSession newSession(ProtocolTransport transport) {
-        return new ProtocolSessionImpl(logger, transport);
+        return new ProtocolSessionImpl(logger, transport, config);
     }
 
 }

Modified: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSession.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSession.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSession.java (original)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSession.java Tue Dec 20 14:26:15 2011
@@ -142,5 +142,12 @@ public interface ProtocolSession {
      * @return true
      */
     boolean isTLSStarted();
+    
+    /**
+     * Return the {@link ProtocolConfiguration} 
+     * 
+     * @return config
+     */
+    ProtocolConfiguration getConfiguration();
 
 }

Modified: james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSessionImpl.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSessionImpl.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSessionImpl.java (original)
+++ james/protocols/trunk/api/src/main/java/org/apache/james/protocols/api/ProtocolSessionImpl.java Tue Dec 20 14:26:15 2011
@@ -39,12 +39,14 @@ public class ProtocolSessionImpl impleme
     private final Map<String, Object> connectionState;
     private final Map<String, Object> sessionState;
     private String user;
+    protected final ProtocolConfiguration config;
 
-    public ProtocolSessionImpl(Logger logger, ProtocolTransport transport) {
+    public ProtocolSessionImpl(Logger logger, ProtocolTransport transport, ProtocolConfiguration config) {
         this.transport = transport;
         this.pLog = new SessionLog(getSessionID(), logger);;
         this.connectionState = new HashMap<String, Object>();
         this.sessionState = new HashMap<String, Object>();
+        this.config = config;
 
     }
 
@@ -168,4 +170,11 @@ public class ProtocolSessionImpl impleme
         sessionState.clear();
     }
 
+    /**
+     * @see org.apache.james.protocols.api.ProtocolSession#getConfiguration()
+     */
+    public ProtocolConfiguration getConfiguration() {
+        return config;
+    }
+
 }

Modified: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPConfiguration.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPConfiguration.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPConfiguration.java (original)
+++ james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPConfiguration.java Tue Dec 20 14:26:15 2011
@@ -18,10 +18,14 @@
  ****************************************************************/
 package org.apache.james.protocols.lmtp;
 
+import org.apache.james.protocols.api.ProtocolConfigurationImpl;
 import org.apache.james.protocols.smtp.SMTPConfiguration;
 
-public abstract class LMTPConfiguration implements SMTPConfiguration{
+public abstract class LMTPConfiguration extends ProtocolConfigurationImpl implements SMTPConfiguration{
 
+    public LMTPConfiguration() {
+        setSoftwareName("JAMES Protocols LMTP Server");
+    }
     /*
      * (non-Javadoc)
      * @see org.apache.james.protocols.smtp.SMTPConfiguration#isRelayingAllowed(java.lang.String)

Modified: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPConfigurationImpl.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPConfigurationImpl.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPConfigurationImpl.java (original)
+++ james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPConfigurationImpl.java Tue Dec 20 14:26:15 2011
@@ -20,22 +20,7 @@ package org.apache.james.protocols.lmtp;
 
 public class LMTPConfigurationImpl extends LMTPConfiguration{
 
-    private String helloName = "localhost";
-    private long maxMessageSize = 0;
-    private String greeting = "JAMES Protocols LMTP Server";
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.james.protocols.smtp.SMTPConfiguration#getHelloName()
-     */
-    public String getHelloName() {
-        return helloName;
-    }
-    
-    public void setHelloName(String helloName) {
-        this.helloName = helloName;
-    }
-    
+    private long maxMessageSize = 0;    
 
     /*
      * (non-Javadoc)
@@ -49,16 +34,4 @@ public class LMTPConfigurationImpl exten
         this.maxMessageSize = maxMessageSize;
     }
     
-
-    /*
-     * (non-Javadoc)
-     * @see org.apache.james.protocols.smtp.SMTPConfiguration#getSMTPGreeting()
-     */
-    public String getSMTPGreeting() {
-        return greeting;
-    }
-    
-    public void setGreeting(String greeting) {
-        this.greeting = greeting;
-    }
 }

Modified: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java (original)
+++ james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPProtocolHandlerChain.java Tue Dec 20 14:26:15 2011
@@ -34,6 +34,7 @@ import org.apache.james.protocols.smtp.c
 import org.apache.james.protocols.smtp.core.RsetCmdHandler;
 import org.apache.james.protocols.smtp.core.SMTPCommandDispatcherLineHandler;
 import org.apache.james.protocols.smtp.core.VrfyCmdHandler;
+import org.apache.james.protocols.smtp.core.WelcomeMessageHandler;
 import org.apache.james.protocols.smtp.core.esmtp.MailSizeEsmtpExtension;
 import org.apache.james.protocols.smtp.core.esmtp.StartTlsCmdHandler;
 import org.apache.james.protocols.smtp.hook.Hook;

Modified: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPReceivedDataLineFilter.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPReceivedDataLineFilter.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPReceivedDataLineFilter.java (original)
+++ james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LMTPReceivedDataLineFilter.java Tue Dec 20 14:26:15 2011
@@ -23,17 +23,12 @@ import org.apache.james.protocols.smtp.c
 
 public class LMTPReceivedDataLineFilter extends ReceivedDataLineFilter {
 
+    private static final String SERVICE_TYPE = "LMTP";
     /**
      * Always returns <code>LMTP</code>
      */
     @Override
     protected String getServiceType(SMTPSession session, String heloMode) {
-        return "LMTP";
+        return SERVICE_TYPE;
     }
-
-    @Override
-    protected String getProductName() {
-        return WelcomeMessageHandler.SOFTWARE_TYPE;
-    }
-
 }

Modified: james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LhloCmdHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LhloCmdHandler.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LhloCmdHandler.java (original)
+++ james/protocols/trunk/lmtp/src/main/java/org/apache/james/protocols/lmtp/LhloCmdHandler.java Tue Dec 20 14:26:15 2011
@@ -21,6 +21,7 @@ package org.apache.james.protocols.lmtp;
 
 import java.util.Arrays;
 import java.util.Collection;
+import java.util.Collections;
 
 import org.apache.james.protocols.smtp.core.esmtp.EhloCmdHandler;
 
@@ -29,9 +30,11 @@ import org.apache.james.protocols.smtp.c
  */
 public class LhloCmdHandler extends EhloCmdHandler {
 
+    private static final Collection<String> COMMANDS = Collections.unmodifiableCollection(Arrays.asList("LHLO"));
+    
     @Override
     public Collection<String> getImplCommands() {
-        return Arrays.asList("LHLO");
+        return COMMANDS;
     }
 
 }

Added: james/protocols/trunk/pop3/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/james/protocols/trunk/pop3/.settings/org.eclipse.jdt.core.prefs?rev=1221277&view=auto
==============================================================================
--- james/protocols/trunk/pop3/.settings/org.eclipse.jdt.core.prefs (added)
+++ james/protocols/trunk/pop3/.settings/org.eclipse.jdt.core.prefs Tue Dec 20 14:26:15 2011
@@ -0,0 +1,274 @@
+#Tue Dec 20 15:24:00 CET 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=300
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

Added: james/protocols/trunk/pop3/.settings/org.eclipse.jdt.ui.prefs
URL: http://svn.apache.org/viewvc/james/protocols/trunk/pop3/.settings/org.eclipse.jdt.ui.prefs?rev=1221277&view=auto
==============================================================================
--- james/protocols/trunk/pop3/.settings/org.eclipse.jdt.ui.prefs (added)
+++ james/protocols/trunk/pop3/.settings/org.eclipse.jdt.ui.prefs Tue Dec 20 14:26:15 2011
@@ -0,0 +1,4 @@
+#Tue Dec 20 15:24:00 CET 2011
+eclipse.preferences.version=1
+formatter_profile=_medianet
+formatter_settings_version=12

Modified: james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Configuration.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Configuration.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Configuration.java (original)
+++ james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Configuration.java Tue Dec 20 14:26:15 2011
@@ -16,19 +16,13 @@
  * specific language governing permissions and limitations      *
  * under the License.                                           *
  ****************************************************************/
-
 package org.apache.james.protocols.pop3;
 
-/**
- * Provides a number of server-wide constant values to the POP3Handlers
- */
-public interface POP3Configuration {
+import org.apache.james.protocols.api.ProtocolConfigurationImpl;
 
-    /**
-     * Returns the service wide hello name
-     * 
-     * @return the hello name
-     */
-    String getHelloName();
+public class POP3Configuration extends ProtocolConfigurationImpl {
 
+    public POP3Configuration() {
+        setSoftwareName("JAMES Protocols POP3 Server");
+    }
 }

Modified: james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Protocol.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Protocol.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Protocol.java (original)
+++ james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Protocol.java Tue Dec 20 14:26:15 2011
@@ -19,18 +19,16 @@
 
 package org.apache.james.protocols.pop3;
 
+import org.apache.james.protocols.api.ProtocolConfiguration;
 import org.apache.james.protocols.api.ProtocolImpl;
 import org.apache.james.protocols.api.ProtocolSession;
 import org.apache.james.protocols.api.ProtocolTransport;
 import org.apache.james.protocols.api.handler.ProtocolHandlerChain;
 
 public class POP3Protocol extends ProtocolImpl{
-
-    private final POP3Configuration config;
     
-    public POP3Protocol(ProtocolHandlerChain chain, POP3Configuration config) {
-        super(chain);
-        this.config = config;
+    public POP3Protocol(ProtocolHandlerChain chain, ProtocolConfiguration config) {
+        super(chain, config);
     }
 
     

Modified: james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Session.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Session.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Session.java (original)
+++ james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3Session.java Tue Dec 20 14:26:15 2011
@@ -43,13 +43,6 @@ public interface POP3Session extends Pro
     final static int TRANSACTION = 2;
 
     /**
-     * Returns POP3Handler service wide configuration
-     * 
-     * @return config
-     */
-    POP3Configuration getConfiguration();
-
-    /**
      * Returns the current handler state
      * 
      * @return handler state

Modified: james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3SessionImpl.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3SessionImpl.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3SessionImpl.java (original)
+++ james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/POP3SessionImpl.java Tue Dec 20 14:26:15 2011
@@ -18,6 +18,7 @@
  ****************************************************************/
 package org.apache.james.protocols.pop3;
 
+import org.apache.james.protocols.api.ProtocolConfiguration;
 import org.apache.james.protocols.api.ProtocolSessionImpl;
 import org.apache.james.protocols.api.ProtocolTransport;
 import org.apache.james.protocols.api.Response;
@@ -28,23 +29,14 @@ import org.slf4j.Logger;
  * {@link POP3Session} implementation which use Netty
  */
 public class POP3SessionImpl extends ProtocolSessionImpl implements POP3Session {
-    private POP3Configuration configData;
 
     private int handlerState;
 
     private Mailbox mailbox;
 
     
-    public POP3SessionImpl(Logger logger, ProtocolTransport transport, POP3Configuration configData) {
-        super(logger, transport);
-        this.configData = configData;
-    }
-
-    /**
-     * @see org.apache.james.pop3server.POP3Session#getConfiguration()
-     */
-    public POP3Configuration getConfiguration() {
-        return configData;
+    public POP3SessionImpl(Logger logger, ProtocolTransport transport, ProtocolConfiguration configData) {
+        super(logger, transport, configData);
     }
 
     /**

Modified: james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/core/WelcomeMessageHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/core/WelcomeMessageHandler.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/core/WelcomeMessageHandler.java (original)
+++ james/protocols/trunk/pop3/src/main/java/org/apache/james/protocols/pop3/core/WelcomeMessageHandler.java Tue Dec 20 14:26:15 2011
@@ -35,13 +35,9 @@ public class WelcomeMessageHandler imple
         StringBuilder responseBuffer = new StringBuilder();
         // Initially greet the connector
         // Format is: Sat, 24 Jan 1998 13:16:09 -0500
-        responseBuffer.append(session.getConfiguration().getHelloName()).append(" POP3 server (").append(getProductName()).append(") ready ");
+        responseBuffer.append(session.getConfiguration().getHelloName()).append(" POP3 server (").append(session.getConfiguration().getSoftwareName()).append(") ready ");
         POP3Response response = new POP3Response(POP3Response.OK_RESPONSE, responseBuffer.toString());
         return response;
     }
-
-    protected String getProductName() {
-        return "JAMES Protocols POP3 Server";
-    }
     
 }

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPConfiguration.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPConfiguration.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPConfiguration.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPConfiguration.java Tue Dec 20 14:26:15 2011
@@ -21,20 +21,15 @@
 
 package org.apache.james.protocols.smtp;
 
+import org.apache.james.protocols.api.ProtocolConfiguration;
+
 
 /**
  * Provides a number of server-wide constant values to the
  * SMTPHandlers
  *
  */
-public interface SMTPConfiguration {
-
-    /**
-     * Returns the service wide hello name
-     *
-     * @return the hello name
-     */
-    String getHelloName();
+public interface SMTPConfiguration extends ProtocolConfiguration{
 
     /**
      * Returns the service wide maximum message size in bytes.
@@ -68,14 +63,6 @@ public interface SMTPConfiguration {
      */
     boolean useHeloEhloEnforcement();
     
-    
-    /**
-     * Return the SMTPGreeting which should used.
-     * 
-     * @return the SMTPGreeting
-     */
-    String getSMTPGreeting();
-    
     /**
      * Return wheter the mailserver will accept addresses without brackets enclosed.
      * 

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPConfigurationImpl.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPConfigurationImpl.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPConfigurationImpl.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPConfigurationImpl.java Tue Dec 20 14:26:15 2011
@@ -20,19 +20,20 @@
 
 package org.apache.james.protocols.smtp;
 
+import org.apache.james.protocols.api.ProtocolConfigurationImpl;
 
-public class SMTPConfigurationImpl implements SMTPConfiguration{
+
+public class SMTPConfigurationImpl extends ProtocolConfigurationImpl implements SMTPConfiguration{
 
     public String helloName = "localhost";
     private long maxMessageSize = 0;
     private boolean bracketsEnforcement = true;
-    private String greeting = "JAMES SMTP Protocols";
     private boolean enforceHeloEhlo = true;
-    
-    public String getHelloName() {
-        return helloName;
-    }
 
+    public SMTPConfigurationImpl() {
+        setSoftwareName("JAMES SMTP Protocols Server");
+    }
+    
     public long getMaxMessageSize() {
         return maxMessageSize;
     }
@@ -53,14 +54,6 @@ public class SMTPConfigurationImpl imple
     public boolean useHeloEhloEnforcement() {
         return enforceHeloEhlo;
     }
-
-    public String getSMTPGreeting() {
-        return greeting;
-    }
-
-    public void setSMTPGreeting(String greeting) {
-        this.greeting = greeting;
-    }
     
     
     public boolean useAddressBracketsEnforcement() {

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocol.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocol.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocol.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocol.java Tue Dec 20 14:26:15 2011
@@ -27,15 +27,12 @@ import org.apache.james.protocols.smtp.S
 import org.apache.james.protocols.smtp.SMTPSessionImpl;
 public class SMTPProtocol extends ProtocolImpl {
 
-    private SMTPConfiguration config;
-
     public SMTPProtocol(ProtocolHandlerChain chain, SMTPConfiguration config) {
-        super(chain);
-        this.config = config;
+        super(chain, config);
     }
 
     public ProtocolSession newSession(ProtocolTransport transport) {
-        return new SMTPSessionImpl(config, logger, transport);
+        return new SMTPSessionImpl(logger, transport, (SMTPConfiguration) config);
     }
 
 }

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPSession.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPSession.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPSession.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPSession.java Tue Dec 20 14:26:15 2011
@@ -92,6 +92,5 @@ public interface SMTPSession extends Pro
      */
     int getPushedLineHandlerCount();
     
-    
 }
 

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPSessionImpl.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPSessionImpl.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPSessionImpl.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPSessionImpl.java Tue Dec 20 14:26:15 2011
@@ -35,13 +35,9 @@ public class SMTPSessionImpl extends Pro
 
     private boolean relayingAllowed;
 
-
-    private final SMTPConfiguration theConfigData;
-
-    public SMTPSessionImpl(SMTPConfiguration theConfigData, Logger logger, ProtocolTransport transport) {
-        super(logger, transport);
-        this.theConfigData = theConfigData;
-        relayingAllowed = theConfigData.isRelayingAllowed(getRemoteIPAddress());
+    public SMTPSessionImpl(Logger logger, ProtocolTransport transport, SMTPConfiguration config) {
+        super(logger, transport, config);
+        relayingAllowed = config.isRelayingAllowed(getRemoteIPAddress());
     }
 
 
@@ -100,7 +96,7 @@ public class SMTPSessionImpl extends Pro
      * @see org.apache.james.protocols.smtp.SMTPSession#isAuthSupported()
      */
     public boolean isAuthSupported() {
-        return theConfigData.isAuthRequired(getRemoteAddress().getAddress().getHostAddress());
+        return getConfiguration().isAuthRequired(getRemoteAddress().getAddress().getHostAddress());
     }
 
     /**
@@ -128,6 +124,6 @@ public class SMTPSessionImpl extends Pro
 
     @Override
     public SMTPConfiguration getConfiguration() {
-        return theConfigData;
+        return (SMTPConfiguration) config;
     }
 }

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/ReceivedDataLineFilter.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/ReceivedDataLineFilter.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/ReceivedDataLineFilter.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/ReceivedDataLineFilter.java Tue Dec 20 14:26:15 2011
@@ -88,7 +88,7 @@ public class ReceivedDataLineFilter impl
             }
             headerLineBuffer.delete(0, headerLineBuffer.length());
 
-            headerLineBuffer.append("          by ").append(session.getConfiguration().getHelloName()).append(" (").append(getProductName()).append(") with ").append(getServiceType(session, heloMode));
+            headerLineBuffer.append("          by ").append(session.getConfiguration().getHelloName()).append(" (").append(session.getConfiguration().getSoftwareName()).append(") with ").append(getServiceType(session, heloMode));
 
            
             headerLineBuffer.append(" ID ").append(session.getSessionID());
@@ -129,14 +129,6 @@ public class ReceivedDataLineFilter impl
         }
     }
     
-    /**
-     * Return the product name to use in the headers
-     * 
-     * @return name
-     */
-    protected String getProductName() {
-        return WelcomeMessageHandler.SOFTWARE_TYPE;
-    }
     
     /**
      * Return the service type which will be used in the Received headers

Modified: james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/WelcomeMessageHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/WelcomeMessageHandler.java?rev=1221277&r1=1221276&r2=1221277&view=diff
==============================================================================
--- james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/WelcomeMessageHandler.java (original)
+++ james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/core/WelcomeMessageHandler.java Tue Dec 20 14:26:15 2011
@@ -31,14 +31,11 @@ import org.apache.james.protocols.smtp.S
  */
 public class WelcomeMessageHandler implements ConnectHandler<SMTPSession> {
 
-    public final static String SOFTWARE_TYPE = "JAMES Protocols SMTP Server"; // +
-
-
     /**
      * @see org.apache.james.protocols.api.handler.ConnectHandler#onConnect(org.apache.james.protocols.api.ProtocolSession)
      */
     public Response onConnect(SMTPSession session) {
-        String smtpGreeting = session.getConfiguration().getSMTPGreeting();
+        String smtpGreeting = session.getConfiguration().getGreeting();
 
         SMTPResponse welcomeResponse;
         // if no greeting was configured use a default
@@ -48,16 +45,12 @@ public class WelcomeMessageHandler imple
                           new StringBuilder(256)
                           .append(session.getConfiguration().getHelloName())
                           .append(" SMTP Server (")
-                          .append(getProductName())
+                          .append(session.getConfiguration().getSoftwareName())
                           .append(") ready"));
         } else {
             welcomeResponse = new SMTPResponse(SMTPRetCode.SERVICE_READY,smtpGreeting);
         }
         return welcomeResponse;
     }
-    
-    protected String getProductName() {
-        return SOFTWARE_TYPE;
-    }
 
 }



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