Author: norman Date: Thu Jul 13 07:11:04 2006 New Revision: 421637 URL: http://svn.apache.org/viewvc?rev=421637&view=rev Log: Reorganize handlers
Added: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/filter/CoreFilterCmdHandlerLoader.java - copied, changed from r421624, james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/CoreFilterCmdHandlerLoader.java Removed: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/CoreFilterCmdHandlerLoader.java Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/CoreCmdHandlerLoader.java james/server/sandbox/handlerapi/src/test/org/apache/james/smtpserver/SMTPTestConfiguration.java Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java?rev=421637&r1=421636&r2=421637&view=diff ============================================================================== --- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java (original) +++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java Thu Jul 13 07:11:04 2006 @@ -31,9 +31,9 @@ import org.apache.avalon.framework.service.ServiceManager; import org.apache.avalon.framework.service.Serviceable; import org.apache.james.smtpserver.core.CoreCmdHandlerLoader; -import org.apache.james.smtpserver.core.CoreFilterCmdHandlerLoader; import org.apache.james.smtpserver.core.SendMailHandler; import org.apache.james.smtpserver.core.UnknownCmdHandler; +import org.apache.james.smtpserver.core.filter.CoreFilterCmdHandlerLoader; import java.util.ArrayList; import java.util.Collection; Modified: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/CoreCmdHandlerLoader.java URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/CoreCmdHandlerLoader.java?rev=421637&r1=421636&r2=421637&view=diff ============================================================================== --- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/CoreCmdHandlerLoader.java (original) +++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/CoreCmdHandlerLoader.java Thu Jul 13 07:11:04 2006 @@ -22,24 +22,23 @@ import org.apache.james.smtpserver.CommandsHandler; - /** * This class represent the base command handlers which are shipped with james. */ public class CoreCmdHandlerLoader implements CommandsHandler { - private final Object AUTHCMDHANDLER = "org.apache.james.smtpserver.AuthCmdHandler"; - private final Object DATACMDHANDLER = "org.apache.james.smtpserver.DataCmdHandler"; - private final Object EHLOCMDHANDLER = "org.apache.james.smtpserver.EhloCmdHandler"; - private final Object EXPNCMDHANDLER = "org.apache.james.smtpserver.ExpnCmdHandler"; - private final Object HELOCMDHANDLER = "org.apache.james.smtpserver.HeloCmdHandler"; - private final Object HELPCMDHANDLER = "org.apache.james.smtpserver.HelpCmdHandler"; - private final Object MAILCMDHANDLER = "org.apache.james.smtpserver.MailCmdHandler"; - private final Object NOOPCMDHANDLER = "org.apache.james.smtpserver.NoopCmdHandler"; - private final Object QUITCMDHANDLER = "org.apache.james.smtpserver.QuitCmdHandler"; - private final Object RCPTCMDHANDLER = "org.apache.james.smtpserver.RcptCmdHandler"; - private final Object RSETCMDHANDLER = "org.apache.james.smtpserver.RsetCmdHandler"; - private final Object VRFYCMDHANDLER = "org.apache.james.smtpserver.VrfyCmdHandler"; + private final Object AUTHCMDHANDLER = AuthCmdHandler.class.getName(); + private final Object DATACMDHANDLER = DataCmdHandler.class.getName(); + private final Object EHLOCMDHANDLER = EhloCmdHandler.class.getName(); + private final Object EXPNCMDHANDLER = ExpnCmdHandler.class.getName(); + private final Object HELOCMDHANDLER = HeloCmdHandler.class.getName(); + private final Object HELPCMDHANDLER = HelpCmdHandler.class.getName(); + private final Object MAILCMDHANDLER = MailCmdHandler.class.getName(); + private final Object NOOPCMDHANDLER = NoopCmdHandler.class.getName(); + private final Object QUITCMDHANDLER = QuitCmdHandler.class.getName(); + private final Object RCPTCMDHANDLER = RcptCmdHandler.class.getName(); + private final Object RSETCMDHANDLER = RsetCmdHandler.class.getName(); + private final Object VRFYCMDHANDLER = VrfyCmdHandler.class.getName(); /** * @see org.apache.james.smtpserver.CommandsHandler#getCommands() Copied: james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/filter/CoreFilterCmdHandlerLoader.java (from r421624, james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/CoreFilterCmdHandlerLoader.java) URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/filter/CoreFilterCmdHandlerLoader.java?p2=james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/filter/CoreFilterCmdHandlerLoader.java&p1=james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/CoreFilterCmdHandlerLoader.java&r1=421624&r2=421637&rev=421637&view=diff ============================================================================== --- james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/CoreFilterCmdHandlerLoader.java (original) +++ james/server/sandbox/handlerapi/src/java/org/apache/james/smtpserver/core/filter/CoreFilterCmdHandlerLoader.java Thu Jul 13 07:11:04 2006 @@ -15,7 +15,7 @@ * permissions and limitations under the License. * ***********************************************************************/ -package org.apache.james.smtpserver.core; +package org.apache.james.smtpserver.core.filter; import java.util.HashMap; import java.util.Map; @@ -28,11 +28,11 @@ */ public class CoreFilterCmdHandlerLoader implements CommandsHandler { - private final Object DATABASEFILTERCMDHANDLER = "org.apache.james.smtpserver.basefilter.DataBaseFilterCmdHandler"; - private final Object EHLOBASEFILTERCMDHANDLER = "org.apache.james.smtpserver.basefilter.EhloBaseFilterCmdHandler"; - private final Object HELOBASEFILTERCMDHANDLER = "org.apache.james.smtpserver.basefilter.HeloBaseFilterCmdHandler"; - private final Object MAILBASEFILTERCMDHANDLER = "org.apache.james.smtpserver.basefilter.MailBaseFilterCmdHandler"; - private final Object RCPTBASEFILTERCMDHANDLER = "org.apache.james.smtpserver.basefilter.RcptBaseFilterCmdHandler"; + private final Object DATABASEFILTERCMDHANDLER = DataFilterCmdHandler.class.getName(); + private final Object EHLOBASEFILTERCMDHANDLER = EhloFilterCmdHandler.class.getName(); + private final Object HELOBASEFILTERCMDHANDLER = HeloFilterCmdHandler.class.getName(); + private final Object MAILBASEFILTERCMDHANDLER = MailFilterCmdHandler.class.getName(); + private final Object RCPTBASEFILTERCMDHANDLER = RcptFilterCmdHandler.class.getName(); /** * @see org.apache.james.smtpserver.CommandsHandler#getCommands() Modified: james/server/sandbox/handlerapi/src/test/org/apache/james/smtpserver/SMTPTestConfiguration.java URL: http://svn.apache.org/viewvc/james/server/sandbox/handlerapi/src/test/org/apache/james/smtpserver/SMTPTestConfiguration.java?rev=421637&r1=421636&r2=421637&view=diff ============================================================================== --- james/server/sandbox/handlerapi/src/test/org/apache/james/smtpserver/SMTPTestConfiguration.java (original) +++ james/server/sandbox/handlerapi/src/test/org/apache/james/smtpserver/SMTPTestConfiguration.java Thu Jul 13 07:11:04 2006 @@ -18,9 +18,11 @@ package org.apache.james.smtpserver; -import org.apache.avalon.framework.configuration.Configuration; +import org.apache.james.smtpserver.core.filter.CoreFilterCmdHandlerLoader; +import org.apache.james.smtpserver.core.filter.fastfail.*; import org.apache.avalon.framework.configuration.ConfigurationException; import org.apache.avalon.framework.configuration.DefaultConfiguration; +import org.apache.james.smtpserver.core.CoreCmdHandlerLoader; import org.apache.james.test.util.Util; public class SMTPTestConfiguration extends DefaultConfiguration { @@ -142,34 +144,34 @@ //handlerConfig.addChild( new DefaultConfiguration("handlerchain")); DefaultConfiguration config = new DefaultConfiguration("handlerchain"); - config.addChild(createHandler("org.apache.james.smtpserver.core.BaseFilterCmdHandler",null)); + config.addChild(createHandler(CoreFilterCmdHandlerLoader.class.getName(),null)); if (m_heloResolv || m_ehloResolv) { - DefaultConfiguration d = createHandler("org.apache.james.smtpserver.fastfailfilter.ResolvableEhloHeloHandler",null); + DefaultConfiguration d = createHandler(ResolvableEhloHeloHandler.class.getName(),null); d.setAttribute("command","EHLO,HELO"); d.addChild(Util.getValuedConfiguration("checkAuthNetworks",m_checkAuthNetworks+"")); config.addChild(d); } if (m_reverseEqualsHelo || m_reverseEqualsEhlo) { - DefaultConfiguration d = createHandler("org.apache.james.smtpserver.fastfailfilter.ReverseEqualsEhloHeloHandler",null); + DefaultConfiguration d = createHandler(ReverseEqualsEhloHeloHandler.class.getName(),null); d.setAttribute("command","EHLO,HELO"); d.addChild(Util.getValuedConfiguration("checkAuthNetworks",m_checkAuthNetworks+"")); config.addChild(d); } if (m_senderDomainResolv) { - DefaultConfiguration d = createHandler("org.apache.james.smtpserver.fastfailfilter.ValidSenderDomainHandler",null); + DefaultConfiguration d = createHandler(ValidSenderDomainHandler.class.getName(),null); d.setAttribute("command","MAIL"); d.addChild(Util.getValuedConfiguration("checkAuthClients",m_checkAuthClients+"")); config.addChild(d); } if (m_maxRcpt > 0) { - DefaultConfiguration d = createHandler("org.apache.james.smtpserver.fastfailfilter.MaxRcptHandler",null); + DefaultConfiguration d = createHandler(MaxRcptHandler.class.getName(),null); d.setAttribute("command","RCPT"); d.addChild(Util.getValuedConfiguration("maxRcpt",m_maxRcpt+"")); config.addChild(d); } - config.addChild(createHandler("org.apache.james.smtpserver.core.BaseCmdHandler",null)); - config.addChild(createHandler("org.apache.james.smtpserver.SendMailHandler",null)); + config.addChild(createHandler(CoreCmdHandlerLoader.class.getName(),null)); + config.addChild(createHandler(org.apache.james.smtpserver.core.SendMailHandler.class.getName(),null)); handlerConfig.addChild(config); addChild(handlerConfig); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]