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 ba...@apache.org on 2011/09/27 12:20:34 UTC
svn commit: r1176312 - in
/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl:
BasicChannelUpstreamHandler.java NettyServer.java
Author: bago
Date: Tue Sep 27 10:20:33 2011
New Revision: 1176312
URL: http://svn.apache.org/viewvc?rev=1176312&view=rev
Log:
As Protocol provides handlerchain access we don't need to pass both of them to the basicchannelupstreamhandler.
Modified:
james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/BasicChannelUpstreamHandler.java
james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/NettyServer.java
Modified: james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/BasicChannelUpstreamHandler.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/BasicChannelUpstreamHandler.java?rev=1176312&r1=1176311&r2=1176312&view=diff
==============================================================================
--- james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/BasicChannelUpstreamHandler.java (original)
+++ james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/BasicChannelUpstreamHandler.java Tue Sep 27 10:20:33 2011
@@ -60,13 +60,13 @@ public class BasicChannelUpstreamHandler
protected Protocol protocol;
protected ProtocolHandlerChain chain;
- public BasicChannelUpstreamHandler(ProtocolHandlerChain chain, Protocol protocol, Logger logger) {
- this(chain, protocol, logger, null, null);
+ public BasicChannelUpstreamHandler(Protocol protocol, Logger logger) {
+ this(protocol, logger, null, null);
}
- public BasicChannelUpstreamHandler(ProtocolHandlerChain chain, Protocol protocol, Logger logger, SSLContext context, String[] enabledCipherSuites) {
- this.chain = chain;
+ public BasicChannelUpstreamHandler(Protocol protocol, Logger logger, SSLContext context, String[] enabledCipherSuites) {
this.protocol = protocol;
+ this.chain = protocol.getProtocolChain();
this.logger = logger;
this.context = context;
this.enabledCipherSuites = enabledCipherSuites;
Modified: james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/NettyServer.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/NettyServer.java?rev=1176312&r1=1176311&r2=1176312&view=diff
==============================================================================
--- james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/NettyServer.java (original)
+++ james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/NettyServer.java Tue Sep 27 10:20:33 2011
@@ -19,15 +19,9 @@
package org.apache.james.protocols.impl;
-import java.nio.charset.Charset;
-
import javax.net.ssl.SSLContext;
import org.apache.james.protocols.api.Protocol;
-import org.apache.james.protocols.impl.AbstractAsyncServer;
-import org.apache.james.protocols.impl.ResponseEncoder;
-import org.apache.james.protocols.impl.AbstractSSLAwareChannelPipelineFactory;
-import org.apache.james.protocols.impl.BasicChannelUpstreamHandler;
import org.jboss.netty.channel.ChannelPipelineFactory;
import org.jboss.netty.channel.ChannelUpstreamHandler;
import org.jboss.netty.channel.group.ChannelGroup;
@@ -90,7 +84,7 @@ public class NettyServer extends Abstrac
@Override
public synchronized void bind() throws Exception {
- coreHandler = new BasicChannelUpstreamHandler(protocol.getProtocolChain(), protocol, logger, context, null);
+ coreHandler = new BasicChannelUpstreamHandler(protocol, logger, context, null);
super.bind();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org