aboutsummaryrefslogtreecommitdiff
path: root/src/net/sourceforge/opentracking/TrackerServer.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2011-06-09 08:50:44 +0000
committerAnton Tananaev <anton.tananaev@gmail.com>2011-06-09 08:50:44 +0000
commitdcbaac71303e606662c8274d5b936fd8323a01b0 (patch)
treea1c4df652cb7a654415a713f806f8fe6ef90c46d /src/net/sourceforge/opentracking/TrackerServer.java
parentd673fa357b64ffa34209465a535d00983cba5576 (diff)
downloadtrackermap-server-dcbaac71303e606662c8274d5b936fd8323a01b0.tar.gz
trackermap-server-dcbaac71303e606662c8274d5b936fd8323a01b0.tar.bz2
trackermap-server-dcbaac71303e606662c8274d5b936fd8323a01b0.zip
Diffstat (limited to 'src/net/sourceforge/opentracking/TrackerServer.java')
-rw-r--r--src/net/sourceforge/opentracking/TrackerServer.java29
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) {