You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by no...@apache.org on 2009/10/15 17:39:09 UTC

svn commit: r825525 - in /james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina: AbstractAsyncServer.java AsyncSMTPServer.java

Author: norman
Date: Thu Oct 15 15:39:08 2009
New Revision: 825525

URL: http://svn.apache.org/viewvc?rev=825525&view=rev
Log:
Javadocs and cleanup

Modified:
    james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AbstractAsyncServer.java
    james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AsyncSMTPServer.java

Modified: james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AbstractAsyncServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AbstractAsyncServer.java?rev=825525&r1=825524&r2=825525&view=diff
==============================================================================
--- james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AbstractAsyncServer.java (original)
+++ james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AbstractAsyncServer.java Thu Oct 15 15:39:08 2009
@@ -185,28 +185,49 @@
 
     /**
      * This method is called on init of the Server. Subclasses should override this method to init stuff
+     *
      * @throws Exception 
      */
     protected void preInit() throws Exception {
-        // TODO Auto-generated method stub
-        
+        // override me
     }
 
+    /**
+     * Return the DNSService
+     * 
+     * @return dns
+     */
     protected DNSService getDNSService() {
         return dns;
     }
     
+    /**
+     * Return the MailServer
+     * 
+     * @return mailServer
+     */
     protected MailServer getMailServer() {
         return mailServer;
     }
     
+    /**
+     * Return the MailetContext
+     * 
+     * @return mailetContext
+     */
     protected MailetContext getMailetContext() {
         return mailetcontext;
     }
     
+    /**
+     * Return the FileSystem
+     * 
+     * @return fileSystem
+     */
     protected FileSystem getFileSystem() {
         return fileSystem;
     }
+    
     /**
      * @see org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
      */
@@ -339,6 +360,11 @@
     }
 
     
+    /**
+     * Configure the helloName for the given Configuration
+     * 
+     * @param handlerConfiguration
+     */
     private void configureHelloName(Configuration handlerConfiguration) {
         StringBuilder infoBuffer;
         String hostName = null;
@@ -422,6 +448,11 @@
         return useStartTLS;
     }
     
+    /**
+     * Build the SslContextFactory
+     * 
+     * @throws Exception
+     */
     private void buildSSLContextFactory() throws Exception{
         if (useStartTLS) {
             KeyStoreFactory kfactory = new KeyStoreFactory();
@@ -452,6 +483,16 @@
         return contextFactory;
     }
     
+    
+    /**
+     * Create IoFilterChainBuilder which will get used for the Acceptor. 
+     * The builder will contain a ProtocalCodecFilter which handles Line based Protocols and
+     * a ConnectionFilter which limit the connection count / connection count per ip.
+     * 
+     * Developers should override this to add more filters to the chain.
+     * 
+     * @return ioFilterChainBuilder
+     */
     protected DefaultIoFilterChainBuilder createIoFilterChainBuilder() {
         ProtocolCodecFilter codecFactory = new ProtocolCodecFilter(new TextLineCodecFactory());
         Log cLogger = new AvalonLogger(getLogger());

Modified: james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AsyncSMTPServer.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AsyncSMTPServer.java?rev=825525&r1=825524&r2=825525&view=diff
==============================================================================
--- james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AsyncSMTPServer.java (original)
+++ james/server/trunk/smtpserver-function/src/main/java/org/apache/james/smtpserver/mina/AsyncSMTPServer.java Thu Oct 15 15:39:08 2009
@@ -43,7 +43,7 @@
  * @version 1.1.0, 06/02/2001
  */
 /*
- * IMPORTANT: SMTPServer extends AbstractJamesService.  If you implement ANY
+ * IMPORTANT: AsyncSMTPServer extends AbstractAsyncServer.  If you implement ANY
  * lifecycle methods, you MUST call super.<method> as well.
  */
 public class AsyncSMTPServer extends AbstractAsyncServer implements SMTPServerMBean {
@@ -112,7 +112,6 @@
     public void configure(final Configuration configuration) throws ConfigurationException {
         super.configure(configuration);
         if (isEnabled()) {
-            System.out.println("HELLO");
             handlerConfiguration = configuration.getChild("handler");
             String authRequiredString = handlerConfiguration.getChild("authRequired").getValue("false").trim().toLowerCase();
             if (authRequiredString.equals("true")) authRequired = AUTH_REQUIRED;
@@ -307,9 +306,6 @@
 		public boolean isStartTLSSupported() {
 			return AsyncSMTPServer.this.isStartTLSSupported();
 		}
-        
-        //TODO: IF we create here an interface to get DNSServer
-        //      we should access it from the SMTPHandlers
 
     }
     



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