diff options
Diffstat (limited to 'src/net/sourceforge/opentracking/TrackerServer.java')
-rw-r--r-- | src/net/sourceforge/opentracking/TrackerServer.java | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/src/net/sourceforge/opentracking/TrackerServer.java b/src/net/sourceforge/opentracking/TrackerServer.java index 4b38920c7..dc9981e61 100644 --- a/src/net/sourceforge/opentracking/TrackerServer.java +++ b/src/net/sourceforge/opentracking/TrackerServer.java @@ -23,10 +23,6 @@ import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory; import org.jboss.netty.channel.group.ChannelGroup; import org.jboss.netty.channel.group.DefaultChannelGroup; import org.jboss.netty.channel.group.ChannelGroupFuture; -import org.jboss.netty.channel.SimpleChannelHandler; -import org.jboss.netty.channel.ChannelHandlerContext; -import org.jboss.netty.channel.ChannelStateEvent; -import org.jboss.netty.channel.ChannelPipelineCoverage; /** * Tracker server @@ -34,24 +30,6 @@ import org.jboss.netty.channel.ChannelPipelineCoverage; public class TrackerServer extends ServerBootstrap { /** - * Open channel handler - */ - @ChannelPipelineCoverage("all") - protected class OpenChannelHandler extends SimpleChannelHandler { - - TrackerServer server; - - public OpenChannelHandler(TrackerServer newServer) { - server = newServer; - } - - @Override - public void channelOpen(ChannelHandlerContext ctx, ChannelStateEvent e) { - server.getChannelGroup().add(e.getChannel()); - } - } - - /** * Initialization */ private void init(Integer port, Integer threadPoolSize) { @@ -60,11 +38,8 @@ public class TrackerServer extends ServerBootstrap { // Create channel factory setFactory(new NioServerSocketChannelFactory( - Executors.newFixedThreadPool(threadPoolSize), - Executors.newFixedThreadPool(threadPoolSize))); - - // Add open channel handler - getPipeline().addLast("openHandler", new OpenChannelHandler(this)); + Executors.newCachedThreadPool(), + Executors.newCachedThreadPool())); } public TrackerServer(Integer port) { |