Fix previous commit
authorJeff MAURY <jeffmaury@apache.org>
Fri, 12 Dec 2014 21:21:00 +0000 (22:21 +0100)
committerJeff MAURY <jeffmaury@apache.org>
Fri, 12 Dec 2014 21:21:00 +0000 (22:21 +0100)
benchmarks/common/src/test/java/org/apache/mina/core/bio/udp/BioUdpBenchmarkServer.java
benchmarks/common/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkClient.java
benchmarks/common/src/test/java/org/apache/mina/core/nio/tcp/Mina3TcpBenchmarkServer.java
benchmarks/common/src/test/java/org/apache/mina/core/nio/udp/Mina3UdpBenchmarkClient.java
benchmarks/common/src/test/java/org/apache/mina/core/nio/udp/Mina3UdpBenchmarkServer.java

index fd9af8d..5fae052 100644 (file)
@@ -23,8 +23,8 @@ import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 
+import org.apache.mina.api.AbstractIoHandler;
 import org.apache.mina.api.IdleStatus;
-import org.apache.mina.api.IoHandler;
 import org.apache.mina.api.IoService;
 import org.apache.mina.api.IoSession;
 import org.apache.mina.core.BenchmarkServer;
@@ -68,7 +68,7 @@ public class BioUdpBenchmarkServer implements BenchmarkServer {
         UdpSessionConfig config = new DefaultUdpSessionConfig();
         config.setReadBufferSize(65536);
         udpServer = new BioUdpServer(config, null);
-        udpServer.setIoHandler(new IoHandler() {
+        udpServer.setIoHandler(new AbstractIoHandler() {
             @Override
             public void sessionOpened(IoSession session) {
                 session.setAttribute(STATE_ATTRIBUTE, State.WAIT_FOR_FIRST_BYTE_LENGTH);
index 44ceeb7..77acf2a 100644 (file)
@@ -24,8 +24,8 @@ import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 import java.util.concurrent.CountDownLatch;
 
+import org.apache.mina.api.AbstractIoHandler;
 import org.apache.mina.api.IdleStatus;
-import org.apache.mina.api.IoHandler;
 import org.apache.mina.api.IoService;
 import org.apache.mina.api.IoSession;
 import org.apache.mina.core.BenchmarkClient;
@@ -46,7 +46,7 @@ public class Mina3TcpBenchmarkClient implements BenchmarkClient {
         client = new NioTcpClient();
         client.getSessionConfig().setSendBufferSize(64 * 1024);
         client.getSessionConfig().setTcpNoDelay(true);
-        client.setIoHandler(new IoHandler() {
+        client.setIoHandler(new AbstractIoHandler() {
             private void sendMessage(IoSession session, byte[] data) {
                 ByteBuffer iobuf = ByteBuffer.wrap(data);
                 session.write(iobuf);
index c8153a2..f4e8c22 100644 (file)
@@ -23,8 +23,8 @@ import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 
+import org.apache.mina.api.AbstractIoHandler;
 import org.apache.mina.api.IdleStatus;
-import org.apache.mina.api.IoHandler;
 import org.apache.mina.api.IoService;
 import org.apache.mina.api.IoSession;
 import org.apache.mina.core.BenchmarkServer;
@@ -65,7 +65,7 @@ public class Mina3TcpBenchmarkServer implements BenchmarkServer {
         tcpServer = new NioTcpServer(new FixedSelectorLoopPool("Server", 1), null);
         tcpServer.getSessionConfig().setReadBufferSize(128 * 1024);
         tcpServer.getSessionConfig().setTcpNoDelay(true);
-        tcpServer.setIoHandler(new IoHandler() {
+        tcpServer.setIoHandler(new AbstractIoHandler() {
             public void sessionOpened(IoSession session) {
                 session.setAttribute(STATE_ATTRIBUTE, State.WAIT_FOR_FIRST_BYTE_LENGTH);
             }
index a4dcf4d..f8d7dc7 100644 (file)
@@ -25,9 +25,9 @@ import java.nio.ByteBuffer;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutionException;
 
+import org.apache.mina.api.AbstractIoHandler;
 import org.apache.mina.api.IdleStatus;
 import org.apache.mina.api.IoFuture;
-import org.apache.mina.api.IoHandler;
 import org.apache.mina.api.IoService;
 import org.apache.mina.api.IoSession;
 import org.apache.mina.core.BenchmarkClient;
@@ -47,7 +47,7 @@ public class Mina3UdpBenchmarkClient implements BenchmarkClient {
      */
     public void start(int port, final CountDownLatch counter, final byte[] data) throws IOException {
         udpClient = new NioUdpClient();
-        udpClient.setIoHandler(new IoHandler() {
+        udpClient.setIoHandler(new AbstractIoHandler() {
             private void sendMessage(IoSession session, byte[] data) {
                 ByteBuffer iobuf = ByteBuffer.wrap(data);
                 session.write(iobuf);
index a9bf2a9..63aa148 100644 (file)
@@ -23,8 +23,8 @@ import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.nio.ByteBuffer;
 
+import org.apache.mina.api.AbstractIoHandler;
 import org.apache.mina.api.IdleStatus;
-import org.apache.mina.api.IoHandler;
 import org.apache.mina.api.IoService;
 import org.apache.mina.api.IoSession;
 import org.apache.mina.core.BenchmarkServer;
@@ -68,7 +68,7 @@ public class Mina3UdpBenchmarkServer implements BenchmarkServer {
         UdpSessionConfig config = new DefaultUdpSessionConfig();
         config.setReadBufferSize(65536);
         udpServer = new NioUdpServer(config);
-        udpServer.setIoHandler(new IoHandler() {
+        udpServer.setIoHandler(new AbstractIoHandler() {
             @Override
             public void sessionOpened(IoSession session) {
                 session.setAttribute(STATE_ATTRIBUTE, State.WAIT_FOR_FIRST_BYTE_LENGTH);