Author: norman
Date: Fri Jan 5 02:11:44 2007
New Revision: 492959
URL: http://svn.apache.org/viewvc?view=rev&rev=492959
Log:
Move base messagehooks to CoreMessageHookLoader. This hooks need to get loaded
after the fastfail MessageHooks
Added:
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreMessageHookLoader.java
(with props)
Modified:
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreCmdHandlerLoader.java
Modified:
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java
URL:
http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java?view=diff&rev=492959&r1=492958&r2=492959
==============================================================================
---
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java
(original)
+++
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/SMTPHandlerChain.java
Fri Jan 5 02:11:44 2007
@@ -32,7 +32,7 @@
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.SendMailHandler;
+import org.apache.james.smtpserver.core.CoreMessageHookLoader;
import java.util.Enumeration;
import java.util.Iterator;
@@ -59,6 +59,7 @@
/**
* ExtensibleHandler wiring
+ *
* @throws WiringException
*/
private void wireExtensibleHandlers() throws WiringException {
@@ -123,9 +124,9 @@
}
}
}
- // load the sendmail handler
- // TODO: Should move this to an extra loader ?
- loadClass(classLoader, SendMailHandler.class.getName(),
addHandler(null, SendMailHandler.class.getName()));
+ // load core messageHandlers
+ loadClass(classLoader, CoreMessageHookLoader.class.getName(),
+ addHandler(null,
CoreMessageHookLoader.class.getName()));
}
}
Modified:
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreCmdHandlerLoader.java
URL:
http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreCmdHandlerLoader.java?view=diff&rev=492959&r1=492958&r2=492959
==============================================================================
---
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreCmdHandlerLoader.java
(original)
+++
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreCmdHandlerLoader.java
Fri Jan 5 02:11:44 2007
@@ -44,8 +44,6 @@
private final Object RSETCMDHANDLER = RsetCmdHandler.class.getName();
private final Object VRFYCMDHANDLER = VrfyCmdHandler.class.getName();
private final Object WELCOMEMESSAGEHANDLER =
WelcomeMessageHandler.class.getName();
- private final Object ADDDEFAULTATTRIBUTESHANDLER =
AddDefaultAttributesMessageHook.class.getName();
- //private final Object SENDMAILHANDLER = SendMailHandler.class.getName();
private final Object USERSREPOSITORYAUTHHANDLER =
UsersRepositoryAuthHook.class.getName();
private final Object POSTMASTERABUSEHOOK =
PostmasterAbuseRcptHook.class.getName();
private final Object AUTHREQUIREDTORELAY =
AuthRequiredToRelayRcptHook.class.getName();
@@ -59,8 +57,6 @@
// Insert the basecommands in the Map
commands.add(WELCOMEMESSAGEHANDLER);
- commands.add(ADDDEFAULTATTRIBUTESHANDLER);
- //commands.add(SENDMAILHANDLER);
commands.add(AUTHCMDHANDLER);
commands.add(DATACMDHANDLER);
commands.add(EHLOCMDHANDLER);
Added:
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreMessageHookLoader.java
URL:
http://svn.apache.org/viewvc/james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreMessageHookLoader.java?view=auto&rev=492959
==============================================================================
---
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreMessageHookLoader.java
(added)
+++
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreMessageHookLoader.java
Fri Jan 5 02:11:44 2007
@@ -0,0 +1,49 @@
+/****************************************************************
+ * 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.smtpserver.core;
+
+import org.apache.james.smtpserver.HandlersPackage;
+
+import java.util.LinkedList;
+import java.util.List;
+
+/**
+ * This class represent the base message hooks which are shipped with james.
+ */
+public class CoreMessageHookLoader implements HandlersPackage {
+
+ private final Object ADDDEFAULTATTRIBUTESHANDLER =
AddDefaultAttributesMessageHook.class.getName();
+ private final Object SENDMAILHANDLER = SendMailHandler.class.getName();
+
+ /**
+ * @see org.apache.james.smtpserver.HandlersPackage#getHandlers()
+ */
+ public List getHandlers() {
+ List commands = new LinkedList();
+
+ // Add the default messageHooks
+ commands.add(ADDDEFAULTATTRIBUTESHANDLER);
+ commands.add(SENDMAILHANDLER);
+
+ return commands;
+ }
+}
Propchange:
james/server/sandbox/handlerapi-experiment/src/java/org/apache/james/smtpserver/core/CoreMessageHookLoader.java
------------------------------------------------------------------------------
svn:eol-style = native
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]