chibenwa commented on a change in pull request #886:
URL: https://github.com/apache/james-project/pull/886#discussion_r830737808



##########
File path: 
protocols/netty/src/main/java/org/apache/james/protocols/netty/AbstractChannelPipelineFactory.java
##########
@@ -18,47 +18,46 @@
  ****************************************************************/
 package org.apache.james.protocols.netty;
 
-import static org.jboss.netty.channel.Channels.pipeline;
-
-import org.jboss.netty.channel.ChannelPipeline;
-import org.jboss.netty.channel.ChannelPipelineFactory;
-import org.jboss.netty.channel.ChannelUpstreamHandler;
-import org.jboss.netty.channel.group.ChannelGroup;
-import org.jboss.netty.handler.execution.ExecutionHandler;
-import org.jboss.netty.handler.stream.ChunkedWriteHandler;
-import org.jboss.netty.util.HashedWheelTimer;
+import io.netty.channel.ChannelHandler;
+import io.netty.channel.ChannelInboundHandlerAdapter;
+import io.netty.channel.ChannelInitializer;
+import io.netty.channel.ChannelPipeline;
+import io.netty.channel.group.ChannelGroup;
+import io.netty.channel.socket.SocketChannel;
+import io.netty.handler.stream.ChunkedWriteHandler;
 
 /**
- * Abstract base class for {@link ChannelPipelineFactory} implementations
+ * Abstract base class for {@link ChannelInitializer} implementations
  */
-public abstract class AbstractChannelPipelineFactory implements 
ChannelPipelineFactory {
[email protected]
+public abstract class AbstractChannelPipelineFactory<C extends SocketChannel> 
extends ChannelInitializer<C> {
     public static final int MAX_LINE_LENGTH = 8192;
 
     protected final ConnectionLimitUpstreamHandler connectionLimitHandler;
     protected final ConnectionPerIpLimitUpstreamHandler 
connectionPerIpLimitHandler;
-    private final HashedWheelTimer timer;
     private final ChannelGroupHandler groupHandler;
     private final int timeout;
-    private final ExecutionHandler eHandler;
     private final ChannelHandlerFactory frameHandlerFactory;
-    
+
+    public AbstractChannelPipelineFactory(ChannelGroup channels,
+                                          ChannelHandlerFactory 
frameHandlerFactory) {
+        this(0, 0, 0, channels, frameHandlerFactory);
+    }
+
     public AbstractChannelPipelineFactory(int timeout, int maxConnections, int 
maxConnectsPerIp, ChannelGroup channels,
-                                          ExecutionHandler eHandler, 
ChannelHandlerFactory frameHandlerFactory,
-                                          HashedWheelTimer hashedWheelTimer) {
+                                          ChannelHandlerFactory 
frameHandlerFactory) {
         this.connectionLimitHandler = new 
ConnectionLimitUpstreamHandler(maxConnections);
         this.connectionPerIpLimitHandler = new 
ConnectionPerIpLimitUpstreamHandler(maxConnectsPerIp);

Review comment:
       This is exactly an improvment I proposed in 
https://github.com/apache/james-project/pull/903




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to