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 no...@apache.org on 2011/10/27 19:46:02 UTC

svn commit: r1189889 - /james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/NettyServer.java

Author: norman
Date: Thu Oct 27 17:46:01 2011
New Revision: 1189889

URL: http://svn.apache.org/viewvc?rev=1189889&view=rev
Log:
use createCoreHandler method the right way

Modified:
    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/NettyServer.java
URL: http://svn.apache.org/viewvc/james/protocols/trunk/impl/src/main/java/org/apache/james/protocols/impl/NettyServer.java?rev=1189889&r1=1189888&r2=1189889&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 Thu Oct 27 17:46:01 2011
@@ -35,9 +35,9 @@ import org.slf4j.LoggerFactory;
  */
 public class NettyServer extends AbstractAsyncServer {
 
-    private Protocol protocol;
+    protected Protocol protocol;
     
-    private Logger logger = LoggerFactory.getLogger(NettyServer.class);
+    protected Logger logger = LoggerFactory.getLogger(NettyServer.class);
 
     protected SSLContext context;
 
@@ -64,7 +64,7 @@ public class NettyServer extends Abstrac
     public void setUseExecutionHandler(boolean useHandler, int size) {
         if (isBound()) throw new IllegalStateException("Server running already");
         if (useHandler) {
-            eHandler =createExecutionHandler(size);
+            eHandler = createExecutionHandler(size);
         } else {
             if (eHandler != null) {
                 eHandler.releaseExternalResources();
@@ -75,12 +75,12 @@ public class NettyServer extends Abstrac
     
   
     protected ChannelUpstreamHandler createCoreHandler() {
-        return coreHandler;
+        return new BasicChannelUpstreamHandler(protocol, logger, context, null);
     }
     
     @Override
     public synchronized void bind() throws Exception {
-        coreHandler = new BasicChannelUpstreamHandler(protocol, logger, context, null);
+        coreHandler = createCoreHandler();
         super.bind();
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org