james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1228095 - /james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factory/protocols/ProtocolHandlerLoaderBeanFactory.java
Date Fri, 06 Jan 2012 11:22:21 GMT
Author: eric
Date: Fri Jan  6 11:22:20 2012
New Revision: 1228095

URL: http://svn.apache.org/viewvc?rev=1228095&view=rev
Log:
Use an InitializingLifecycleAwareProtocolHandler interface with the init method (JAMES-1360)

Modified:
    james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factory/protocols/ProtocolHandlerLoaderBeanFactory.java

Modified: james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factory/protocols/ProtocolHandlerLoaderBeanFactory.java
URL: http://svn.apache.org/viewvc/james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factory/protocols/ProtocolHandlerLoaderBeanFactory.java?rev=1228095&r1=1228094&r2=1228095&view=diff
==============================================================================
--- james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factory/protocols/ProtocolHandlerLoaderBeanFactory.java
(original)
+++ james/server/trunk/container-spring/src/main/java/org/apache/james/container/spring/bean/factory/protocols/ProtocolHandlerLoaderBeanFactory.java
Fri Jan  6 11:22:20 2012
@@ -23,7 +23,8 @@ import org.apache.commons.configuration.
 import org.apache.james.container.spring.bean.AbstractBeanFactory;
 import org.apache.james.protocols.api.handler.LifecycleAwareProtocolHandler;
 import org.apache.james.protocols.api.handler.ProtocolHandler;
-import org.apache.james.protocols.api.handler.ProtocolHandlerLoader;
+import org.apache.james.protocols.lib.handler.ProtocolHandlerLoader;
+import org.apache.james.protocols.lib.lifecycle.InitializingLifecycleAwareProtocolHandler;
 import org.springframework.beans.BeansException;
 
 public class ProtocolHandlerLoaderBeanFactory extends AbstractBeanFactory implements ProtocolHandlerLoader{
@@ -37,12 +38,11 @@ public class ProtocolHandlerLoaderBeanFa
             Class<ProtocolHandler> c = (Class<ProtocolHandler>) getBeanFactory().getBeanClassLoader().loadClass(name);
             ProtocolHandler handler =  (ProtocolHandler) getBeanFactory().createBean(c);
             if (handler instanceof LifecycleAwareProtocolHandler) {
-                ((LifecycleAwareProtocolHandler) handler).init(config);
+                ((InitializingLifecycleAwareProtocolHandler) handler).init(config);
             }
             return handler;
         } catch (ClassNotFoundException e) {
             throw new LoadingException("Unable to load handler", e);
-
         } catch (BeansException e) {
             throw new LoadingException("Unable to load handler", e);
         } catch (ConfigurationException e) {



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