directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r725712 [4/9] - in /directory: apacheds/trunk/ apacheds/trunk/all/ apacheds/trunk/bootstrap-plugin/src/main/java/org/apache/directory/server/core/bootstrap/plugin/ apacheds/trunk/core-avl/src/main/java/org/apache/directory/server/core/avltr...
Date Thu, 11 Dec 2008 15:32:12 GMT
Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpProtocolCodecFactory.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpProtocolCodecFactory.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpProtocolCodecFactory.java Thu Dec 11 07:32:04 2008
@@ -21,6 +21,7 @@
 package org.apache.directory.server.changepw.protocol;
 
 
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
 import org.apache.mina.filter.codec.ProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolEncoder;
@@ -52,14 +53,14 @@
     }
 
 
-    public ProtocolEncoder getEncoder()
+    public ProtocolEncoder getEncoder( IoSession session )
     {
         // Create a new encoder.
         return new ChangePasswordTcpEncoder();
     }
 
 
-    public ProtocolDecoder getDecoder()
+    public ProtocolDecoder getDecoder( IoSession session )
     {
         // Create a new decoder.
         return new ChangePasswordTcpDecoder();

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpDecoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpDecoder.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpDecoder.java Thu Dec 11 07:32:04 2008
@@ -24,8 +24,8 @@
 import java.io.IOException;
 
 import org.apache.directory.server.changepw.io.ChangePasswordRequestDecoder;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolDecoderAdapter;
 import org.apache.mina.filter.codec.ProtocolDecoderOutput;
 
@@ -36,7 +36,7 @@
  */
 public class ChangePasswordUdpDecoder extends ProtocolDecoderAdapter
 {
-    public void decode( IoSession session, ByteBuffer in, ProtocolDecoderOutput out ) throws IOException
+    public void decode( IoSession session, IoBuffer in, ProtocolDecoderOutput out ) throws IOException
     {
         ChangePasswordRequestDecoder decoder = new ChangePasswordRequestDecoder();
         out.write( decoder.decode( in.buf() ) );

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpEncoder.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpEncoder.java Thu Dec 11 07:32:04 2008
@@ -27,8 +27,8 @@
 import org.apache.directory.server.changepw.io.ChangePasswordReplyEncoder;
 import org.apache.directory.server.changepw.messages.ChangePasswordError;
 import org.apache.directory.server.changepw.messages.ChangePasswordReply;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolEncoderAdapter;
 import org.apache.mina.filter.codec.ProtocolEncoderOutput;
 
@@ -41,7 +41,7 @@
 {
     public void encode( IoSession session, Object message, ProtocolEncoderOutput out ) throws IOException
     {
-        ByteBuffer buf = ByteBuffer.allocate( 512 );
+        IoBuffer buf = IoBuffer.allocate( 512 );
 
         if ( message instanceof ChangePasswordReply )
         {
@@ -61,7 +61,7 @@
     }
 
 
-    private void encodeReply( ChangePasswordReply reply, ByteBuffer buf ) throws IOException
+    private void encodeReply( ChangePasswordReply reply, IoBuffer buf ) throws IOException
     {
         ChangePasswordReplyEncoder encoder = new ChangePasswordReplyEncoder();
 
@@ -69,7 +69,7 @@
     }
 
 
-    private void encodeError( ChangePasswordError error, ByteBuffer buf ) throws IOException
+    private void encodeError( ChangePasswordError error, IoBuffer buf ) throws IOException
     {
         ChangePasswordErrorEncoder encoder = new ChangePasswordErrorEncoder();
 

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpProtocolCodecFactory.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpProtocolCodecFactory.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordUdpProtocolCodecFactory.java Thu Dec 11 07:32:04 2008
@@ -21,6 +21,7 @@
 package org.apache.directory.server.changepw.protocol;
 
 
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
 import org.apache.mina.filter.codec.ProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolEncoder;
@@ -52,14 +53,14 @@
     }
 
 
-    public ProtocolEncoder getEncoder()
+    public ProtocolEncoder getEncoder( IoSession session )
     {
         // Create a new encoder.
         return new ChangePasswordUdpEncoder();
     }
 
 
-    public ProtocolDecoder getDecoder()
+    public ProtocolDecoder getDecoder( IoSession session )
     {
         // Create a new decoder.
         return new ChangePasswordUdpDecoder();

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java Thu Dec 11 07:32:04 2008
@@ -41,7 +41,6 @@
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.KeyUsage;
 import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
-//import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
 import org.apache.directory.server.kerberos.shared.messages.ApplicationRequest;
 import org.apache.directory.server.kerberos.shared.messages.application.ApplicationReply;
 import org.apache.directory.server.kerberos.shared.messages.application.PrivateMessage;
@@ -59,7 +58,7 @@
 import org.apache.directory.server.kerberos.shared.replay.ReplayCache;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStoreEntry;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.session.IoSession;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/CheckPasswordPolicy.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/CheckPasswordPolicy.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/CheckPasswordPolicy.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/CheckPasswordPolicy.java Thu Dec 11 07:32:04 2008
@@ -29,7 +29,7 @@
 import org.apache.directory.server.changepw.exceptions.ChangePasswordException;
 import org.apache.directory.server.changepw.exceptions.ErrorType;
 import org.apache.directory.server.kerberos.shared.messages.components.Authenticator;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.handler.chain.IoHandlerCommand;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/test/java/org/apache/directory/server/changepw/protocol/ChangepwProtocolHandlerTest.java Thu Dec 11 07:32:04 2008
@@ -58,14 +58,8 @@
 import org.apache.directory.server.kerberos.shared.messages.value.types.PrincipalNameType;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 import org.apache.directory.server.kerberos.shared.store.TicketFactory;
-import org.apache.mina.common.IoFilterChain;
-import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoService;
-import org.apache.mina.common.IoServiceConfig;
-import org.apache.mina.common.IoSessionConfig;
-import org.apache.mina.common.TransportType;
-import org.apache.mina.common.WriteFuture;
-import org.apache.mina.common.support.BaseIoSession;
+import org.apache.mina.core.future.WriteFuture;
+import org.apache.mina.core.session.DummySession;
 
 
 /**
@@ -86,7 +80,7 @@
     private ChangePasswordServer config;
     private PrincipalStore store;
     private ChangePasswordProtocolHandler handler;
-    private DummySession session;
+    private ChPwdDummySession session;
 
     private CipherTextHandler cipherTextHandler = new CipherTextHandler();
 
@@ -99,7 +93,7 @@
         config = new ChangePasswordServer();
         store = new MapPrincipalStoreImpl();
         handler = new ChangePasswordProtocolHandler( config, store );
-        session = new DummySession();
+        session = new ChPwdDummySession();
     }
 
 
@@ -328,95 +322,33 @@
         return principalName;
     }
 
-    private static class DummySession extends BaseIoSession
+    private static class ChPwdDummySession extends DummySession
     {
         Object message;
 
-
-        @Override
-        public WriteFuture write( Object message )
-        {
-            this.message = message;
-
-            return super.write( message );
-        }
-
-
+        
         private Object getMessage()
         {
             return message;
         }
 
 
-        protected void updateTrafficMask()
-        {
-            // Do nothing.
-        }
-
-
-        public IoService getService()
-        {
-            return null;
-        }
-
-
-        public IoHandler getHandler()
-        {
-            return null;
-        }
-
-
-        public IoFilterChain getFilterChain()
-        {
-            return null;
-        }
-
-
-        public TransportType getTransportType()
-        {
-            return null;
-        }
-
-
         public SocketAddress getRemoteAddress()
         {
             return new InetSocketAddress( 10464 );
         }
-
-
-        public SocketAddress getLocalAddress()
-        {
-            return null;
-        }
-
-
-        public IoSessionConfig getConfig()
-        {
-            return null;
-        }
-
-
+        
+        
         public int getScheduledWriteRequests()
         {
             return 0;
         }
-
-
-        public SocketAddress getServiceAddress()
-        {
-            return null;
-        }
-
-
-        public IoServiceConfig getServiceConfig()
+        
+        
+        public WriteFuture write(Object message) 
         {
+            this.message = message;
             return null;
         }
-
-
-        public int getScheduledWriteBytes()
-        {
-            return 0;
-        }
     }
 }

Modified: directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpDecoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpDecoder.java (original)
+++ directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpDecoder.java Thu Dec 11 07:32:04 2008
@@ -23,8 +23,8 @@
 
 import org.apache.directory.server.dhcp.DhcpException;
 import org.apache.directory.server.dhcp.io.DhcpMessageDecoder;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolDecoderOutput;
 
@@ -35,7 +35,7 @@
  */
 public class DhcpDecoder implements ProtocolDecoder
 {
-    public void decode( IoSession session, ByteBuffer in, ProtocolDecoderOutput out ) throws DhcpException
+    public void decode( IoSession session, IoBuffer in, ProtocolDecoderOutput out ) throws DhcpException
     {
         DhcpMessageDecoder decoder = new DhcpMessageDecoder();
         out.write( decoder.decode( in.buf() ) );

Modified: directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpEncoder.java Thu Dec 11 07:32:04 2008
@@ -23,8 +23,8 @@
 
 import org.apache.directory.server.dhcp.io.DhcpMessageEncoder;
 import org.apache.directory.server.dhcp.messages.DhcpMessage;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolEncoder;
 import org.apache.mina.filter.codec.ProtocolEncoderOutput;
 
@@ -41,7 +41,7 @@
 
     public void encode( IoSession session, Object message, ProtocolEncoderOutput out )
     {
-        ByteBuffer buf = ByteBuffer.allocate( 1024 );
+        IoBuffer buf = IoBuffer.allocate( 1024 );
         encoder.encode( buf.buf(), ( DhcpMessage ) message );
 
         buf.flip();

Modified: directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolCodecFactory.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolCodecFactory.java (original)
+++ directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolCodecFactory.java Thu Dec 11 07:32:04 2008
@@ -21,6 +21,7 @@
 package org.apache.directory.server.dhcp.protocol;
 
 
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
 import org.apache.mina.filter.codec.ProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolEncoder;
@@ -46,14 +47,14 @@
     }
 
 
-    public ProtocolEncoder getEncoder()
+    public ProtocolEncoder getEncoder( IoSession session )
     {
         // Create a new encoder.
         return new DhcpEncoder();
     }
 
 
-    public ProtocolDecoder getDecoder()
+    public ProtocolDecoder getDecoder( IoSession session )
     {
         // Create a new decoder.
         return new DhcpDecoder();

Modified: directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolHandler.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-dhcp/src/main/java/org/apache/directory/server/dhcp/protocol/DhcpProtocolHandler.java Thu Dec 11 07:32:04 2008
@@ -26,10 +26,9 @@
 import org.apache.directory.server.dhcp.messages.DhcpMessage;
 import org.apache.directory.server.dhcp.messages.MessageType;
 import org.apache.directory.server.dhcp.service.DhcpService;
-import org.apache.mina.common.BroadcastIoSession;
-import org.apache.mina.common.IdleStatus;
-import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.service.IoHandler;
+import org.apache.mina.core.session.IdleStatus;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFilter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -93,7 +92,7 @@
         logger.error("EXCEPTION CAUGHT ", cause);
         cause.printStackTrace(System.out);
 
-        session.close();
+        session.close( true );
     }
 
     public void messageReceived(IoSession session, Object message)
@@ -110,7 +109,7 @@
 
         if (null != reply) {
             final InetSocketAddress isa = determineMessageDestination(request, reply);
-            ((BroadcastIoSession) session).write(reply, isa);
+            session.write(reply, isa);
         }
     }
 

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/DnsServer.java Thu Dec 11 07:32:04 2008
@@ -27,8 +27,6 @@
 import org.apache.directory.server.dns.store.RecordStore;
 import org.apache.directory.server.dns.store.jndi.JndiRecordStoreImpl;
 import org.apache.directory.server.protocol.shared.DirectoryBackedService;
-import org.apache.mina.transport.socket.nio.DatagramAcceptorConfig;
-import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -78,16 +76,16 @@
 
         if ( getDatagramAcceptor() != null )
         {
-            DatagramAcceptorConfig udpConfig = new DatagramAcceptorConfig();
-            getDatagramAcceptor().bind( new InetSocketAddress( getIpPort() ), new DnsProtocolHandler( this, store ), udpConfig );
+            getDatagramAcceptor().setHandler( new DnsProtocolHandler( this, store ) );
+            getDatagramAcceptor().bind( new InetSocketAddress( getIpPort() ) );
         }
 
         if ( getSocketAcceptor() != null )
         {
-            SocketAcceptorConfig tcpConfig = new SocketAcceptorConfig();
-            tcpConfig.setDisconnectOnUnbind( false );
-            tcpConfig.setReuseAddress( true );
-            getSocketAcceptor().bind( new InetSocketAddress( getIpPort() ), new DnsProtocolHandler( this, store ), tcpConfig );
+            getSocketAcceptor().setCloseOnDeactivation( false );
+            getSocketAcceptor().setReuseAddress( true );
+            getSocketAcceptor().setHandler( new DnsProtocolHandler( this, store ) );
+            getSocketAcceptor().bind( new InetSocketAddress( getIpPort() ) );
         }
         
         LOG.info( "DSN service started." );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/Main.java Thu Dec 11 07:32:04 2008
@@ -26,8 +26,8 @@
 
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.protocol.shared.DatagramAcceptor;
-import org.apache.directory.server.protocol.shared.SocketAcceptor;
+import org.apache.mina.transport.socket.nio.NioDatagramAcceptor;
+import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -62,8 +62,8 @@
     {
         LOG.debug( "Starting the DNS server" );
         
-        DatagramAcceptor datagramAcceptor = new DatagramAcceptor( null );
-        SocketAcceptor socketAcceptor = new SocketAcceptor( null );
+        NioDatagramAcceptor datagramAcceptor = new NioDatagramAcceptor( null );
+        NioSocketAcceptor socketAcceptor = new NioSocketAcceptor();
         DirectoryService directoryService = new DefaultDirectoryService();
         dnsConfiguration = new DnsServer();
         dnsConfiguration.setDatagramAcceptor( datagramAcceptor );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoder.java Thu Dec 11 07:32:04 2008
@@ -27,7 +27,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -51,7 +51,7 @@
  */
 public class AddressRecordDecoder implements RecordDecoder
 {
-    public Map<String, Object> decode( ByteBuffer byteBuffer, short length ) throws IOException
+    public Map<String, Object> decode( IoBuffer byteBuffer, short length ) throws IOException
     {
         Map<String, Object> attributes = new HashMap<String, Object>();
         byte[] addressBytes = new byte[length];

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/DnsMessageDecoder.java Thu Dec 11 07:32:04 2008
@@ -38,7 +38,7 @@
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.messages.ResourceRecordImpl;
 import org.apache.directory.server.dns.messages.ResponseCode;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -82,7 +82,7 @@
      * @return The {@link DnsMessage}.
      * @throws IOException
      */
-    public DnsMessage decode( ByteBuffer in ) throws IOException
+    public DnsMessage decode( IoBuffer in ) throws IOException
     {
         DnsMessageModifier modifier = new DnsMessageModifier();
 
@@ -120,7 +120,7 @@
     }
 
 
-    private List<ResourceRecord> getRecords( ByteBuffer byteBuffer, short recordCount ) throws IOException
+    private List<ResourceRecord> getRecords( IoBuffer byteBuffer, short recordCount ) throws IOException
     {
         List<ResourceRecord> records = new ArrayList<ResourceRecord>( recordCount );
 
@@ -141,7 +141,7 @@
     }
 
 
-    private Map<String, Object> decode( ByteBuffer byteBuffer, RecordType type, short length ) throws IOException
+    private Map<String, Object> decode( IoBuffer byteBuffer, RecordType type, short length ) throws IOException
     {
         RecordDecoder recordDecoder = DEFAULT_DECODERS.get( type );
 
@@ -154,7 +154,7 @@
     }
 
 
-    private List<QuestionRecord> getQuestions( ByteBuffer byteBuffer, short questionCount )
+    private List<QuestionRecord> getQuestions( IoBuffer byteBuffer, short questionCount )
     {
         List<QuestionRecord> questions = new ArrayList<QuestionRecord>( questionCount );
 
@@ -172,7 +172,7 @@
     }
 
 
-    static String getDomainName( ByteBuffer byteBuffer )
+    static String getDomainName( IoBuffer byteBuffer )
     {
         StringBuffer domainName = new StringBuffer();
         recurseDomainName( byteBuffer, domainName );
@@ -181,7 +181,7 @@
     }
 
 
-    static void recurseDomainName( ByteBuffer byteBuffer, StringBuffer domainName )
+    static void recurseDomainName( IoBuffer byteBuffer, StringBuffer domainName )
     {
         int length = byteBuffer.getUnsigned();
 
@@ -217,7 +217,7 @@
     }
 
 
-    static void getLabel( ByteBuffer byteBuffer, StringBuffer domainName, int labelLength )
+    static void getLabel( IoBuffer byteBuffer, StringBuffer domainName, int labelLength )
     {
         for ( int jj = 0; jj < labelLength; jj++ )
         {

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoder.java Thu Dec 11 07:32:04 2008
@@ -27,7 +27,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -46,7 +46,7 @@
 public class IPv6RecordDecoder implements RecordDecoder
 {
 
-    public Map<String, Object> decode( ByteBuffer byteBuffer, short length ) throws IOException
+    public Map<String, Object> decode( IoBuffer byteBuffer, short length ) throws IOException
     {
         Map<String, Object> attributes = new HashMap<String, Object>();
         byte[] addressBytes = new byte[length];

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoder.java Thu Dec 11 07:32:04 2008
@@ -26,7 +26,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -58,7 +58,7 @@
  */
 public class MailExchangeRecordDecoder implements RecordDecoder
 {
-    public Map<String, Object> decode( ByteBuffer byteBuffer, short length ) throws IOException
+    public Map<String, Object> decode( IoBuffer byteBuffer, short length ) throws IOException
     {
         Map<String, Object> attributes = new HashMap<String, Object>();
         attributes.put( DnsAttribute.MX_PREFERENCE, byteBuffer.getShort() );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoder.java Thu Dec 11 07:32:04 2008
@@ -26,7 +26,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -52,7 +52,7 @@
  */
 public class NameServerRecordDecoder implements RecordDecoder
 {
-    public Map<String, Object> decode( ByteBuffer byteBuffer, short length ) throws IOException
+    public Map<String, Object> decode( IoBuffer byteBuffer, short length ) throws IOException
     {
         Map<String, Object> map = new HashMap<String, Object>();
         map.put( DnsAttribute.DOMAIN_NAME, DnsMessageDecoder.getDomainName( byteBuffer ) );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/RecordDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/RecordDecoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/RecordDecoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/decoder/RecordDecoder.java Thu Dec 11 07:32:04 2008
@@ -24,7 +24,7 @@
 import java.io.IOException;
 import java.util.Map;
 
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -42,5 +42,5 @@
      * @return The map of attributes.
      * @throws IOException
      */
-    public Map<String, Object> decode( ByteBuffer byteBuffer, short length ) throws IOException;
+    public Map<String, Object> decode( IoBuffer byteBuffer, short length ) throws IOException;
 }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -26,7 +26,7 @@
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -53,7 +53,7 @@
  */
 public class AddressRecordEncoder extends ResourceRecordEncoder
 {
-    protected void putResourceRecordData( ByteBuffer byteBuffer, ResourceRecord record )
+    protected void putResourceRecordData( IoBuffer byteBuffer, ResourceRecord record )
     {
         String ipAddress = record.get( DnsAttribute.IP_ADDRESS );
 

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -23,7 +23,7 @@
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -48,7 +48,7 @@
  */
 public class CanonicalNameRecordEncoder extends ResourceRecordEncoder
 {
-    protected void putResourceRecordData( ByteBuffer byteBuffer, ResourceRecord record )
+    protected void putResourceRecordData( IoBuffer byteBuffer, ResourceRecord record )
     {
         String domainName = record.get( DnsAttribute.DOMAIN_NAME );
 

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java Thu Dec 11 07:32:04 2008
@@ -35,7 +35,7 @@
 import org.apache.directory.server.dns.messages.RecordType;
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.messages.ResponseCode;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -82,7 +82,7 @@
      * @param byteBuffer
      * @param message
      */
-    public void encode( ByteBuffer byteBuffer, DnsMessage message )
+    public void encode( IoBuffer byteBuffer, DnsMessage message )
     {
         byteBuffer.putShort( ( short ) message.getTransactionId() );
 
@@ -114,7 +114,7 @@
     }
 
 
-    private void putQuestionRecords( ByteBuffer byteBuffer, List<QuestionRecord> questions )
+    private void putQuestionRecords( IoBuffer byteBuffer, List<QuestionRecord> questions )
     {
         if ( questions == null )
         {
@@ -133,7 +133,7 @@
     }
 
 
-    private void putResourceRecords( ByteBuffer byteBuffer, List<ResourceRecord> records )
+    private void putResourceRecords( IoBuffer byteBuffer, List<ResourceRecord> records )
     {
         if ( records == null )
         {
@@ -158,7 +158,7 @@
     }
 
 
-    private void put( ByteBuffer byteBuffer, ResourceRecord record ) throws IOException
+    private void put( IoBuffer byteBuffer, ResourceRecord record ) throws IOException
     {
         RecordType type = record.getRecordType();
 

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -23,7 +23,7 @@
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -54,7 +54,7 @@
  */
 public class MailExchangeRecordEncoder extends ResourceRecordEncoder
 {
-    protected void putResourceRecordData( ByteBuffer byteBuffer, ResourceRecord record )
+    protected void putResourceRecordData( IoBuffer byteBuffer, ResourceRecord record )
     {
         byteBuffer.putShort( Short.parseShort( record.get( DnsAttribute.MX_PREFERENCE ) ) );
         putDomainName( byteBuffer, record.get( DnsAttribute.DOMAIN_NAME ) );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -23,7 +23,7 @@
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -55,7 +55,7 @@
  */
 public class NameServerRecordEncoder extends ResourceRecordEncoder
 {
-    protected void putResourceRecordData( ByteBuffer byteBuffer, ResourceRecord record )
+    protected void putResourceRecordData( IoBuffer byteBuffer, ResourceRecord record )
     {
         String domainName = record.get( DnsAttribute.DOMAIN_NAME );
 

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -23,7 +23,7 @@
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -49,7 +49,7 @@
  */
 public class PointerRecordEncoder extends ResourceRecordEncoder
 {
-    protected void putResourceRecordData( ByteBuffer byteBuffer, ResourceRecord record )
+    protected void putResourceRecordData( IoBuffer byteBuffer, ResourceRecord record )
     {
         String domainName = record.get( DnsAttribute.DOMAIN_NAME );
 

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -24,7 +24,7 @@
 import org.apache.directory.server.dns.messages.QuestionRecord;
 import org.apache.directory.server.dns.messages.RecordClass;
 import org.apache.directory.server.dns.messages.RecordType;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -39,7 +39,7 @@
      * @param out
      * @param question
      */
-    public void put( ByteBuffer out, QuestionRecord question )
+    public void put( IoBuffer out, QuestionRecord question )
     {
         encodeDomainName( out, question.getDomainName() );
         encodeRecordType( out, question.getRecordType() );
@@ -47,7 +47,7 @@
     }
 
 
-    private void encodeDomainName( ByteBuffer byteBuffer, String domainName )
+    private void encodeDomainName( IoBuffer byteBuffer, String domainName )
     {
         String[] labels = domainName.split( "\\." );
 
@@ -66,13 +66,13 @@
     }
 
 
-    private void encodeRecordType( ByteBuffer byteBuffer, RecordType recordType )
+    private void encodeRecordType( IoBuffer byteBuffer, RecordType recordType )
     {
         byteBuffer.putShort( recordType.convert() );
     }
 
 
-    private void encodeRecordClass( ByteBuffer byteBuffer, RecordClass recordClass )
+    private void encodeRecordClass( IoBuffer byteBuffer, RecordClass recordClass )
     {
         byteBuffer.putShort( recordClass.convert() );
     }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/RecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/RecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/RecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/RecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -24,7 +24,7 @@
 import java.io.IOException;
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -40,5 +40,5 @@
      * @param record
      * @throws IOException
      */
-    public void put( ByteBuffer buffer, ResourceRecord record ) throws IOException;
+    public void put( IoBuffer buffer, ResourceRecord record ) throws IOException;
 }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/ResourceRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/ResourceRecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/ResourceRecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/ResourceRecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -26,7 +26,7 @@
 import org.apache.directory.server.dns.messages.RecordClass;
 import org.apache.directory.server.dns.messages.RecordType;
 import org.apache.directory.server.dns.messages.ResourceRecord;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -35,7 +35,7 @@
  */
 public abstract class ResourceRecordEncoder implements RecordEncoder
 {
-    public void put( ByteBuffer byteBuffer, ResourceRecord record ) throws IOException
+    public void put( IoBuffer byteBuffer, ResourceRecord record ) throws IOException
     {
         putDomainName( byteBuffer, record.getDomainName() );
         putRecordType( byteBuffer, record.getRecordType() );
@@ -47,10 +47,10 @@
     }
 
 
-    protected abstract void putResourceRecordData( ByteBuffer byteBuffer, ResourceRecord record );
+    protected abstract void putResourceRecordData( IoBuffer byteBuffer, ResourceRecord record );
 
 
-    protected void putResourceRecord( ByteBuffer byteBuffer, ResourceRecord record )
+    protected void putResourceRecord( IoBuffer byteBuffer, ResourceRecord record )
     {
         int startPosition = byteBuffer.position();
         byteBuffer.position( startPosition + 2 );
@@ -61,7 +61,7 @@
     }
 
 
-    protected void putDataSize( ByteBuffer byteBuffer, int startPosition )
+    protected void putDataSize( IoBuffer byteBuffer, int startPosition )
     {
         int endPosition = byteBuffer.position();
         short length = ( short ) ( endPosition - startPosition - 2 );
@@ -79,7 +79,7 @@
      * @param byteBuffer the ByteBuffer to encode the domain name into
      * @param domainName the domain name to encode
      */
-    protected void putDomainName( ByteBuffer byteBuffer, String domainName )
+    protected void putDomainName( IoBuffer byteBuffer, String domainName )
     {
         String[] labels = domainName.split( "\\." );
 
@@ -98,13 +98,13 @@
     }
 
 
-    protected void putRecordType( ByteBuffer byteBuffer, RecordType recordType )
+    protected void putRecordType( IoBuffer byteBuffer, RecordType recordType )
     {
         byteBuffer.putShort( recordType.convert() );
     }
 
 
-    protected void putRecordClass( ByteBuffer byteBuffer, RecordClass recordClass )
+    protected void putRecordClass( IoBuffer byteBuffer, RecordClass recordClass )
     {
         byteBuffer.putShort( recordClass.convert() );
     }
@@ -118,7 +118,7 @@
      * @param byteBuffer The byte buffer to encode the character string into.
      * @param characterString the character string to encode
      */
-    protected void putCharacterString( ByteBuffer byteBuffer, String characterString )
+    protected void putCharacterString( IoBuffer byteBuffer, String characterString )
     {
         byteBuffer.put( ( byte ) characterString.length() );
 

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -23,7 +23,7 @@
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -130,7 +130,7 @@
  */
 public class ServerSelectionRecordEncoder extends ResourceRecordEncoder
 {
-    protected void putResourceRecordData( ByteBuffer byteBuffer, ResourceRecord record )
+    protected void putResourceRecordData( IoBuffer byteBuffer, ResourceRecord record )
     {
         byteBuffer.putShort( Short.parseShort( record.get( DnsAttribute.SERVICE_PRIORITY ) ) );
         byteBuffer.putShort( Short.parseShort( record.get( DnsAttribute.SERVICE_WEIGHT ) ) );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -23,7 +23,7 @@
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 /**
  * 3.3.13. SOA RDATA format
@@ -96,7 +96,7 @@
  */
 public class StartOfAuthorityRecordEncoder extends ResourceRecordEncoder
 {
-    protected void putResourceRecordData( ByteBuffer byteBuffer, ResourceRecord record )
+    protected void putResourceRecordData( IoBuffer byteBuffer, ResourceRecord record )
     {
         String mName = record.get( DnsAttribute.SOA_M_NAME );
         String rName = record.get( DnsAttribute.SOA_R_NAME );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoder.java Thu Dec 11 07:32:04 2008
@@ -23,7 +23,7 @@
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -45,7 +45,7 @@
  */
 public class TextRecordEncoder extends ResourceRecordEncoder
 {
-    protected void putResourceRecordData( ByteBuffer byteBuffer, ResourceRecord record )
+    protected void putResourceRecordData( IoBuffer byteBuffer, ResourceRecord record )
     {
         putCharacterString( byteBuffer, record.get( DnsAttribute.CHARACTER_STRING ) );
     }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java Thu Dec 11 07:32:04 2008
@@ -34,10 +34,9 @@
 import org.apache.directory.server.dns.service.DnsContext;
 import org.apache.directory.server.dns.service.DomainNameService;
 import org.apache.directory.server.dns.store.RecordStore;
-import org.apache.mina.common.IdleStatus;
-import org.apache.mina.common.IoHandler;
-import org.apache.mina.common.IoSession;
-import org.apache.mina.common.TransportType;
+import org.apache.mina.core.service.IoHandler;
+import org.apache.mina.core.session.IdleStatus;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFilter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -73,10 +72,10 @@
     {
         if ( LOG.isDebugEnabled() )
         {
-            LOG.debug( "{} CREATED:  {}", session.getRemoteAddress(), session.getTransportType() );
+            LOG.debug( "{} CREATED:  {}", session.getRemoteAddress(), session.getTransportMetadata() );
         }
 
-        if ( session.getTransportType() == TransportType.DATAGRAM )
+        if ( session.getTransportMetadata().isConnectionless() )
         {
             session.getFilterChain().addFirst( "codec",
                 new ProtocolCodecFilter( DnsProtocolUdpCodecFactory.getInstance() ) );
@@ -110,7 +109,7 @@
     public void exceptionCaught( IoSession session, Throwable cause )
     {
         LOG.error( session.getRemoteAddress() + " EXCEPTION", cause );
-        session.close();
+        session.close( true );
     }
 
 

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolTcpCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolTcpCodecFactory.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolTcpCodecFactory.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolTcpCodecFactory.java Thu Dec 11 07:32:04 2008
@@ -21,6 +21,7 @@
 package org.apache.directory.server.dns.protocol;
 
 
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
 import org.apache.mina.filter.codec.ProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolEncoder;
@@ -52,14 +53,14 @@
     }
 
 
-    public ProtocolEncoder getEncoder()
+    public ProtocolEncoder getEncoder( IoSession session )
     {
         // Create a new encoder.
         return new DnsTcpEncoder();
     }
 
 
-    public ProtocolDecoder getDecoder()
+    public ProtocolDecoder getDecoder( IoSession session )
     {
         // Create a new decoder.
         return new DnsTcpDecoder();

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolUdpCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolUdpCodecFactory.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolUdpCodecFactory.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolUdpCodecFactory.java Thu Dec 11 07:32:04 2008
@@ -21,6 +21,7 @@
 package org.apache.directory.server.dns.protocol;
 
 
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolCodecFactory;
 import org.apache.mina.filter.codec.ProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolEncoder;
@@ -52,14 +53,14 @@
     }
 
 
-    public ProtocolEncoder getEncoder()
+    public ProtocolEncoder getEncoder( IoSession session )
     {
         // Create a new encoder.
         return new DnsUdpEncoder();
     }
 
 
-    public ProtocolDecoder getDecoder()
+    public ProtocolDecoder getDecoder( IoSession session )
     {
         // Create a new decoder.
         return new DnsUdpDecoder();

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpDecoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpDecoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpDecoder.java Thu Dec 11 07:32:04 2008
@@ -22,9 +22,8 @@
 
 
 import org.apache.directory.server.dns.io.decoder.DnsMessageDecoder;
-import org.apache.mina.common.BufferDataException;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.CumulativeProtocolDecoder;
 import org.apache.mina.filter.codec.ProtocolDecoderOutput;
 
@@ -77,7 +76,7 @@
 
 
     @Override
-    protected boolean doDecode( IoSession session, ByteBuffer in, ProtocolDecoderOutput out ) throws Exception
+    protected boolean doDecode( IoSession session, IoBuffer in, ProtocolDecoderOutput out ) throws Exception
     {
         if ( !in.prefixedDataAvailable( 2, maxObjectSize ) )
         {

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsTcpEncoder.java Thu Dec 11 07:32:04 2008
@@ -23,8 +23,8 @@
 
 import org.apache.directory.server.dns.io.encoder.DnsMessageEncoder;
 import org.apache.directory.server.dns.messages.DnsMessage;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolEncoderAdapter;
 import org.apache.mina.filter.codec.ProtocolEncoderOutput;
 
@@ -43,7 +43,7 @@
 
     public void encode( IoSession session, Object message, ProtocolEncoderOutput out )
     {
-        ByteBuffer buf = ByteBuffer.allocate( 1024 );
+        IoBuffer buf = IoBuffer.allocate( 1024 );
 
         // make space for short length
         buf.putShort( ( short ) 0 );

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsUdpDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsUdpDecoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsUdpDecoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsUdpDecoder.java Thu Dec 11 07:32:04 2008
@@ -24,8 +24,8 @@
 import java.io.IOException;
 
 import org.apache.directory.server.dns.io.decoder.DnsMessageDecoder;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolDecoderAdapter;
 import org.apache.mina.filter.codec.ProtocolDecoderOutput;
 
@@ -42,7 +42,7 @@
     private DnsMessageDecoder decoder = new DnsMessageDecoder();
 
 
-    public void decode( IoSession session, ByteBuffer in, ProtocolDecoderOutput out ) throws IOException
+    public void decode( IoSession session, IoBuffer in, ProtocolDecoderOutput out ) throws IOException
     {
         out.write( decoder.decode( in ) );
     }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsUdpEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsUdpEncoder.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsUdpEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsUdpEncoder.java Thu Dec 11 07:32:04 2008
@@ -23,8 +23,8 @@
 
 import org.apache.directory.server.dns.io.encoder.DnsMessageEncoder;
 import org.apache.directory.server.dns.messages.DnsMessage;
-import org.apache.mina.common.ByteBuffer;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.buffer.IoBuffer;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.filter.codec.ProtocolEncoderAdapter;
 import org.apache.mina.filter.codec.ProtocolEncoderOutput;
 
@@ -43,7 +43,7 @@
 
     public void encode( IoSession session, Object message, ProtocolEncoderOutput out )
     {
-        ByteBuffer buf = ByteBuffer.allocate( 1024 );
+        IoBuffer buf = IoBuffer.allocate( 1024 );
         encoder.encode( buf, ( DnsMessage ) message );
 
         buf.flip();

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/MonitorContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/MonitorContext.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/MonitorContext.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/MonitorContext.java Thu Dec 11 07:32:04 2008
@@ -24,7 +24,7 @@
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.RecordStore;
-import org.apache.mina.common.IoSession;
+import org.apache.mina.core.session.IoSession;
 import org.apache.mina.handler.chain.IoHandlerCommand;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/AbstractDnsTestCase.java Thu Dec 11 07:32:04 2008
@@ -41,7 +41,7 @@
 import org.apache.directory.server.dns.messages.ResourceRecordModifier;
 import org.apache.directory.server.dns.messages.ResponseCode;
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -53,31 +53,31 @@
     protected static final int MINIMUM_DNS_DATAGRAM_SIZE = 576;
 
 
-    protected ByteBuffer getTestQueryByteBuffer() throws IOException
+    protected IoBuffer getTestQueryByteBuffer() throws IOException
     {
         return getByteBufferFromFile( "DNS-QUERY.pdu" );
     }
 
 
-    protected ByteBuffer getTestResponseByteBuffer() throws IOException
+    protected IoBuffer getTestResponseByteBuffer() throws IOException
     {
         return getByteBufferFromFile( "DNS-RESPONSE.pdu" );
     }
 
 
-    protected ByteBuffer getTestMxQueryByteBuffer() throws IOException
+    protected IoBuffer getTestMxQueryByteBuffer() throws IOException
     {
         return getByteBufferFromFile( "MX-QUERY.pdu" );
     }
 
 
-    protected ByteBuffer getTestMxResponseByteBuffer() throws IOException
+    protected IoBuffer getTestMxResponseByteBuffer() throws IOException
     {
         return getByteBufferFromFile( "MX-RESPONSE.pdu" );
     }
 
 
-    protected ByteBuffer getByteBufferFromFile( String file ) throws IOException
+    protected IoBuffer getByteBufferFromFile( String file ) throws IOException
     {
         InputStream is = getClass().getResourceAsStream( file );
 
@@ -92,7 +92,7 @@
 
         is.close();
 
-        return ByteBuffer.wrap( bytes );
+        return IoBuffer.wrap( bytes );
     }
 
 

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/AddressRecordDecoderTest.java Thu Dec 11 07:32:04 2008
@@ -27,7 +27,7 @@
 import junit.framework.TestCase;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -39,7 +39,7 @@
 public class AddressRecordDecoderTest extends TestCase
 {
     InetAddress address;
-    ByteBuffer inputBuffer;
+    IoBuffer inputBuffer;
 
     AddressRecordDecoder decoder;
 
@@ -47,7 +47,7 @@
     public void setUp() throws Exception
     {
         address = InetAddress.getByName( "127.0.0.1" );
-        inputBuffer = ByteBuffer.allocate( address.getAddress().length );
+        inputBuffer = IoBuffer.allocate( address.getAddress().length );
         inputBuffer.put( address.getAddress() );
         inputBuffer.flip();
 

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/IPv6RecordDecoderTest.java Thu Dec 11 07:32:04 2008
@@ -27,7 +27,7 @@
 import junit.framework.TestCase;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -39,7 +39,7 @@
 public class IPv6RecordDecoderTest extends TestCase
 {
     InetAddress address;
-    ByteBuffer inputBuffer;
+    IoBuffer inputBuffer;
 
     IPv6RecordDecoder decoder;
 
@@ -47,7 +47,7 @@
     public void setUp() throws Exception
     {
         address = InetAddress.getByName( "0:0:0:0:0:0:0:1" );
-        inputBuffer = ByteBuffer.allocate( address.getAddress().length );
+        inputBuffer = IoBuffer.allocate( address.getAddress().length );
         inputBuffer.put( address.getAddress() );
         inputBuffer.flip();
 

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/MailExchangeRecordDecoderTest.java Thu Dec 11 07:32:04 2008
@@ -26,7 +26,7 @@
 import junit.framework.TestCase;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -37,7 +37,7 @@
  */
 public class MailExchangeRecordDecoderTest extends TestCase
 {
-    ByteBuffer inputBuffer;
+    IoBuffer inputBuffer;
 
     short preference = 10;
     String domainName = "herse.apache.org";
@@ -49,7 +49,7 @@
 
     public void setUp()
     {
-        inputBuffer = ByteBuffer.allocate( 128 );
+        inputBuffer = IoBuffer.allocate( 128 );
         inputBuffer.putShort( preference );
         inputBuffer.put( ( byte ) domainNameParts[0].length() );
         inputBuffer.put( domainNameParts[0].getBytes() );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/decoder/NameServerRecordDecoderTest.java Thu Dec 11 07:32:04 2008
@@ -26,7 +26,7 @@
 import junit.framework.TestCase;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -37,7 +37,7 @@
  */
 public class NameServerRecordDecoderTest extends TestCase
 {
-    ByteBuffer inputBuffer;
+    IoBuffer inputBuffer;
 
     String domainName = "ns.hyperreal.org";
     String[] domainNameParts = new String[]
@@ -48,7 +48,7 @@
 
     public void setUp()
     {
-        inputBuffer = ByteBuffer.allocate( 128 );
+        inputBuffer = IoBuffer.allocate( 128 );
         inputBuffer.put( ( byte ) domainNameParts[0].length() );
         inputBuffer.put( domainNameParts[0].getBytes() );
         inputBuffer.put( ( byte ) domainNameParts[1].length() );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AbstractResourceRecordEncoderTest.java Thu Dec 11 07:32:04 2008
@@ -30,7 +30,7 @@
 import org.apache.directory.server.dns.messages.RecordType;
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.messages.ResourceRecordImpl;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -43,7 +43,7 @@
  */
 public abstract class AbstractResourceRecordEncoderTest extends TestCase
 {
-    ByteBuffer expectedData;
+    IoBuffer expectedData;
     String domainName = "herse.apache.org";
     String[] domainNameParts = domainName.split( "\\." );
     int timeToLive = 3400;
@@ -55,7 +55,7 @@
         setUpResourceData();
         record = new ResourceRecordImpl( domainName, RecordType.A, RecordClass.IN, timeToLive, getAttributes() );
 
-        expectedData = ByteBuffer.allocate( 128 );
+        expectedData = IoBuffer.allocate( 128 );
         expectedData.put( ( byte ) 18 );
         expectedData.put( ( byte ) domainNameParts[0].length() ); // 1
         expectedData.put( domainNameParts[0].getBytes() ); // + 5
@@ -73,7 +73,7 @@
 
     public void testEncode() throws IOException
     {
-        ByteBuffer outBuffer = ByteBuffer.allocate( 128 );
+        IoBuffer outBuffer = IoBuffer.allocate( 128 );
         getEncoder().put( outBuffer, record );
         assertEquals( expectedData, outBuffer );
     }
@@ -108,5 +108,5 @@
      * 
      * @param expectedData buffer where the expected resource data should be put
      */
-    protected abstract void putExpectedResourceData( ByteBuffer expectedData );
+    protected abstract void putExpectedResourceData( IoBuffer expectedData );
 }

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/AddressRecordEncoderTest.java Thu Dec 11 07:32:04 2008
@@ -27,7 +27,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -68,7 +68,7 @@
     }
 
 
-    protected void putExpectedResourceData( ByteBuffer expectedData )
+    protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) address.getAddress().length );
         expectedData.put( address.getAddress() );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/CanonicalNameRecordEncoderTest.java Thu Dec 11 07:32:04 2008
@@ -45,7 +45,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -74,7 +74,7 @@
     }
 
 
-    protected void putExpectedResourceData( ByteBuffer expectedData )
+    protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 18 );
         expectedData.put( ( byte ) cnameParts[0].length() ); // 1

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/MailExchangeRecordEncoderTest.java Thu Dec 11 07:32:04 2008
@@ -25,7 +25,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -56,7 +56,7 @@
     }
 
 
-    protected void putExpectedResourceData( ByteBuffer expectedData )
+    protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 20 );
         expectedData.putShort( Short.parseShort( mxPreference ) );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/NameServerRecordEncoderTest.java Thu Dec 11 07:32:04 2008
@@ -25,7 +25,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -54,7 +54,7 @@
     }
 
 
-    protected void putExpectedResourceData( ByteBuffer expectedData )
+    protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 19 );
         expectedData.put( ( byte ) nsParts[0].length() ); // 1

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/PointerRecordEncoderTest.java Thu Dec 11 07:32:04 2008
@@ -25,7 +25,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -54,7 +54,7 @@
     }
 
 
-    protected void putExpectedResourceData( ByteBuffer expectedData )
+    protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 15 );
         expectedData.put( ( byte ) ptrParts[0].length() ); // 1

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/QuestionRecordEncoderTest.java Thu Dec 11 07:32:04 2008
@@ -26,7 +26,7 @@
 import org.apache.directory.server.dns.messages.QuestionRecord;
 import org.apache.directory.server.dns.messages.RecordClass;
 import org.apache.directory.server.dns.messages.RecordType;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -37,7 +37,7 @@
  */
 public class QuestionRecordEncoderTest extends TestCase
 {
-    ByteBuffer expectedData;
+    IoBuffer expectedData;
 
     QuestionRecordEncoder encoder;
 
@@ -53,7 +53,7 @@
     {
         encoder = new QuestionRecordEncoder();
 
-        expectedData = ByteBuffer.allocate( 128 );
+        expectedData = IoBuffer.allocate( 128 );
         expectedData.put( ( byte ) nameParts[0].length() ); // 1
         expectedData.put( nameParts[0].getBytes() ); // + 3
         expectedData.put( ( byte ) nameParts[1].length() ); // + 1
@@ -68,7 +68,7 @@
 
     public void testEncode()
     {
-        ByteBuffer out = ByteBuffer.allocate( 128 );
+        IoBuffer out = IoBuffer.allocate( 128 );
         encoder.put( out, record );
         assertEquals( expectedData, out );
     }

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/ServerSelectionRecordEncoderTest.java Thu Dec 11 07:32:04 2008
@@ -25,7 +25,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -63,7 +63,7 @@
 
 
     @Override
-    protected void putExpectedResourceData( ByteBuffer expectedData )
+    protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 22 );
         expectedData.putShort( Short.parseShort( priority ) );

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/StartOfAuthorityRecordEncoderTest.java Thu Dec 11 07:32:04 2008
@@ -25,7 +25,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -67,7 +67,7 @@
     }
 
 
-    protected void putExpectedResourceData( ByteBuffer expectedData )
+    protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) 60 ); // 1 + 18 + 1 + 20 + 4 + 4 + 4 + 4 + 4
         expectedData.put( ( byte ) mNameParts[0].length() ); // 1

Modified: directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java?rev=725712&r1=725711&r2=725712&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/test/java/org/apache/directory/server/dns/io/encoder/TextRecordEncoderTest.java Thu Dec 11 07:32:04 2008
@@ -25,7 +25,7 @@
 import java.util.Map;
 
 import org.apache.directory.server.dns.store.DnsAttribute;
-import org.apache.mina.common.ByteBuffer;
+import org.apache.mina.core.buffer.IoBuffer;
 
 
 /**
@@ -53,7 +53,7 @@
     }
 
 
-    protected void putExpectedResourceData( ByteBuffer expectedData )
+    protected void putExpectedResourceData( IoBuffer expectedData )
     {
         expectedData.put( ( byte ) ( characterString.length() + 1 ) );
         expectedData.put( ( byte ) characterString.length() );



Mime
View raw message