You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mina.apache.org by el...@apache.org on 2013/03/22 14:49:23 UTC

[5/5] git commit: o Added the Mina3_udp and Netty3_udp type o Added the Netty3 UDP client and server classes

o Added the Mina3_udp and Netty3_udp type
o Added the Netty3 UDP client and server classes

Project: http://git-wip-us.apache.org/repos/asf/mina/repo
Commit: http://git-wip-us.apache.org/repos/asf/mina/commit/abe19430
Tree: http://git-wip-us.apache.org/repos/asf/mina/tree/abe19430
Diff: http://git-wip-us.apache.org/repos/asf/mina/diff/abe19430

Branch: refs/heads/trunk
Commit: abe19430989b3a6aa6c84570ba494f10ab74bf9d
Parents: 587f4fd
Author: Emmanuel Lécharny <el...@apache.org>
Authored: Fri Mar 22 14:16:54 2013 +0100
Committer: Emmanuel Lécharny <el...@apache.org>
Committed: Fri Mar 22 14:16:54 2013 +0100

----------------------------------------------------------------------
 .../apache/mina/core/BenchmarkClientFactory.java   |    3 +++
 .../apache/mina/core/BenchmarkServerFactory.java   |    3 +++
 .../core/nio/udp/Netty3UdpBenchmarkClient.java     |    4 ++--
 .../core/nio/udp/Netty3UdpBenchmarkServer.java     |    4 ++--
 4 files changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mina/blob/abe19430/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java
----------------------------------------------------------------------
diff --git a/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java b/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java
index 059651a..2330b6e 100755
--- a/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java
+++ b/benchmarks/src/test/java/org/apache/mina/core/BenchmarkClientFactory.java
@@ -22,6 +22,7 @@ package org.apache.mina.core;
 import org.apache.mina.core.nio.tcp.Mina3TcpBenchmarkClient;
 import org.apache.mina.core.nio.tcp.Netty3TcpBenchmarkClient;
 import org.apache.mina.core.nio.udp.Mina3UdpBenchmarkClient;
+import org.apache.mina.core.nio.udp.Netty3UdpBenchmarkClient;
 
 /**
  * @author <a href="http://mina.apache.org">Apache MINA Project</a>
@@ -38,6 +39,8 @@ public class BenchmarkClientFactory implements BenchmarkFactory<BenchmarkClient>
             return new Mina3UdpBenchmarkClient();
         case Netty3_tcp:
             return new Netty3TcpBenchmarkClient();
+        case Netty3_udp:
+            return new Netty3UdpBenchmarkClient();
         default:
             throw new IllegalArgumentException("Invalid type " + type);
         }

http://git-wip-us.apache.org/repos/asf/mina/blob/abe19430/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java
----------------------------------------------------------------------
diff --git a/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java b/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java
index 6377063..e2a7015 100755
--- a/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java
+++ b/benchmarks/src/test/java/org/apache/mina/core/BenchmarkServerFactory.java
@@ -22,6 +22,7 @@ package org.apache.mina.core;
 import org.apache.mina.core.nio.tcp.Mina3TcpBenchmarkServer;
 import org.apache.mina.core.nio.tcp.Netty3TcpBenchmarkServer;
 import org.apache.mina.core.nio.udp.Mina3UdpBenchmarkServer;
+import org.apache.mina.core.nio.udp.Netty3UdpBenchmarkServer;
 
 /**
  * @author <a href="http://mina.apache.org">Apache MINA Project</a>
@@ -41,6 +42,8 @@ public class BenchmarkServerFactory implements BenchmarkFactory<BenchmarkServer>
             return new Mina3UdpBenchmarkServer();
         case Netty3_tcp:
             return new Netty3TcpBenchmarkServer();
+        case Netty3_udp:
+            return new Netty3UdpBenchmarkServer();
         default:
             throw new IllegalArgumentException("Invalid type " + type);
         }

http://git-wip-us.apache.org/repos/asf/mina/blob/abe19430/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkClient.java
----------------------------------------------------------------------
diff --git a/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkClient.java b/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkClient.java
index f7637cf..14177c6 100644
--- a/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkClient.java
+++ b/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkClient.java
@@ -24,7 +24,7 @@ import java.net.InetSocketAddress;
 import java.util.concurrent.CountDownLatch;
 
 import org.apache.mina.core.BenchmarkClient;
-import org.jboss.netty.bootstrap.ClientBootstrap;
+import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.jboss.netty.buffer.ChannelBuffers;
 import org.jboss.netty.channel.ChannelFactory;
@@ -55,7 +55,7 @@ public class Netty3UdpBenchmarkClient implements BenchmarkClient {
      */
     public void start(final int port, final CountDownLatch counter, final byte[] data) throws IOException {
         factory = new NioDatagramChannelFactory();
-        ClientBootstrap bootstrap = new ClientBootstrap(factory);
+        ConnectionlessBootstrap bootstrap = new ConnectionlessBootstrap(factory);
         bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
             public ChannelPipeline getPipeline() throws Exception {
                 return Channels.pipeline(new SimpleChannelUpstreamHandler() {

http://git-wip-us.apache.org/repos/asf/mina/blob/abe19430/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkServer.java
----------------------------------------------------------------------
diff --git a/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkServer.java b/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkServer.java
index d6d89ac..e1f41d0 100644
--- a/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkServer.java
+++ b/benchmarks/src/test/java/org/apache/mina/core/nio/udp/Netty3UdpBenchmarkServer.java
@@ -25,7 +25,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.mina.core.BenchmarkServer;
-import org.jboss.netty.bootstrap.ServerBootstrap;
+import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
 import org.jboss.netty.buffer.ChannelBuffer;
 import org.jboss.netty.buffer.ChannelBuffers;
 import org.jboss.netty.channel.ChannelFactory;
@@ -93,7 +93,7 @@ public class Netty3UdpBenchmarkServer implements BenchmarkServer {
      */
     public void start(int port) throws IOException {
         factory = new NioDatagramChannelFactory();
-        ServerBootstrap bootstrap = new ServerBootstrap(factory);
+        ConnectionlessBootstrap bootstrap = new ConnectionlessBootstrap(factory);
         bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
             public ChannelPipeline getPipeline() throws Exception {
                 return Channels.pipeline(new SimpleChannelUpstreamHandler() {