Author: norman
Date: Wed Sep 21 05:58:24 2011
New Revision: 1173506
URL: http://svn.apache.org/viewvc?rev=1173506&view=rev
Log:
Allow to overwrite default handlers
Modified:
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
Modified:
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
URL:
http://svn.apache.org/viewvc/james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java?rev=1173506&r1=1173505&r2=1173506&view=diff
==============================================================================
---
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
(original)
+++
james/protocols/trunk/smtp/src/main/java/org/apache/james/protocols/smtp/SMTPProtocolHandlerChain.java
Wed Sep 21 05:58:24 2011
@@ -66,6 +66,14 @@ public class SMTPProtocolHandlerChain ex
private boolean authHandler = false;
public SMTPProtocolHandlerChain() throws WiringException {
+ defaultHandlers.addAll(initDefaultHandlers());
+ copy();
+
+ wireExtensibleHandlers();
+ }
+
+ protected List<Object> initDefaultHandlers() {
+ List<Object> defaultHandlers = new ArrayList<Object>();
defaultHandlers.add(new SMTPCommandDispatcherLineHandler());
defaultHandlers.add(new ExpnCmdHandler());
defaultHandlers.add(new EhloCmdHandler());
@@ -84,10 +92,9 @@ public class SMTPProtocolHandlerChain ex
defaultHandlers.add(new ReceivedDataLineFilter());
defaultHandlers.add(new DataLineMessageHookHandler());
defaultHandlers.add(new StartTlsCmdHandler());
- copy();
-
- wireExtensibleHandlers();
+ return defaultHandlers;
}
+
/**
* Add the hook to the chain
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]