directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r703486 [2/4] - in /directory: apacheds/trunk/ apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/keytab/ apacheds/trunk/kerberos-shared/src/test/java/org/apache/directory/server/kerberos/shared/keytab/...
Date Fri, 10 Oct 2008 14:46:56 GMT
Modified: directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java?rev=703486&r1=703485&r2=703486&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java (original)
+++ directory/apacheds/trunk/mitosis/src/main/java/org/apache/directory/mitosis/service/protocol/handler/ReplicationServerContextHandler.java Fri Oct 10 07:46:51 2008
@@ -35,8 +35,9 @@
 import org.apache.directory.mitosis.service.protocol.message.LoginAckMessage;
 import org.apache.directory.mitosis.service.protocol.message.LoginMessage;
 import org.apache.directory.mitosis.store.ReplicationStore;
-import org.apache.mina.common.IdleStatus;
-import org.apache.mina.util.SessionLog;
+import org.apache.mina.core.session.IdleStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.net.InetSocketAddress;
 
@@ -52,16 +53,19 @@
  */
 public class ReplicationServerContextHandler implements ReplicationContextHandler
 {
+    /** A logger for this class */
+    private final Logger logger = LoggerFactory.getLogger(getClass());
+
     private Replica replicaInTransaction;
 
 
     public void contextBegin( ReplicationContext ctx ) throws Exception
     {
         // Set login timeout
-        ctx.getSession().setIdleTime( IdleStatus.BOTH_IDLE, ctx.getConfiguration().getResponseTimeout() );
+        ctx.getSession().getConfig().setIdleTime( IdleStatus.BOTH_IDLE, ctx.getConfiguration().getResponseTimeout() );
 
         // Set write timeout
-        ctx.getSession().setWriteTimeout( ctx.getConfiguration().getResponseTimeout() );
+        ctx.getSession().getConfig().setWriteTimeout( ctx.getConfiguration().getResponseTimeout() );
     }
 
 
@@ -117,7 +121,7 @@
 
     public void exceptionCaught( ReplicationContext ctx, Throwable cause ) throws Exception
     {
-        SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+        logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] Unexpected exception.", cause );
         ctx.getSession().close();
     }
@@ -127,7 +131,7 @@
     {
         if ( ctx.getState() == State.INIT )
         {
-            SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+            logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] No login attempt in " + ctx.getConfiguration().getResponseTimeout()
                 + " second(s)." );
             ctx.getSession().close();
@@ -152,12 +156,12 @@
                     ctx.setState( State.READY );
 
                     // Clear login timeout.
-                    ctx.getSession().setIdleTime( IdleStatus.BOTH_IDLE, 0 );
+                    ctx.getSession().getConfig().setIdleTime( IdleStatus.BOTH_IDLE, 0 );
                     return;
                 }
                 else
                 {
-                    SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+                    logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                             + "] Peer address mismatches: "
                             + ctx.getSession().getRemoteAddress() + " (expected: " + replica.getAddress() );
                     ctx.getSession().write(
@@ -169,7 +173,7 @@
             }
         }
 
-        SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+        logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] Unknown peer replica ID: " + message.getReplicaId() );
         ctx.getSession().write(
             new LoginAckMessage( message.getSequence(), Constants.NOT_OK, ctx.getConfiguration().getReplicaId() ) );
@@ -228,7 +232,7 @@
         }
         catch ( Exception e )
         {
-            SessionLog.warn( ctx.getSession(), "Failed to get update vector.", e );
+            logger.warn( "Failed to get update vector.", e );
             ctx.getSession()
                 .write( new BeginLogEntriesAckMessage( message.getSequence(), Constants.NOT_OK, null, null ) );
         }
@@ -252,7 +256,7 @@
 
     private void onUnexpectedMessage( ReplicationContext ctx, Object message )
     {
-        SessionLog.warn( ctx.getSession(), "[Replica-" + ctx.getConfiguration().getReplicaId()
+        logger.warn( "[Replica-" + ctx.getConfiguration().getReplicaId()
                 + "] Unexpected message: " + message );
         ctx.getSession().close();
     }

Modified: directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java?rev=703486&r1=703485&r2=703486&view=diff
==============================================================================
--- directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java (original)
+++ directory/apacheds/trunk/mitosis/src/test/java/org/apache/directory/mitosis/service/protocol/codec/AbstractMessageCodecTest.java Fri Oct 10 07:46:51 2008
@@ -29,20 +29,20 @@
 
 import org.apache.directory.mitosis.service.protocol.message.BaseMessage;
 import org.apache.directory.server.core.DefaultDirectoryService;
-import org.apache.mina.common.ByteBuffer;
-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.IoSession;
-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.buffer.IoBuffer;
+import org.apache.mina.core.filterchain.IoFilterChain;
+import org.apache.mina.core.future.WriteFuture;
+import org.apache.mina.core.service.IoHandler;
+import org.apache.mina.core.service.IoProcessor;
+import org.apache.mina.core.service.IoService;
+import org.apache.mina.core.service.TransportMetadata;
+import org.apache.mina.core.session.AbstractIoSession;
+import org.apache.mina.core.session.IoSession;
+import org.apache.mina.core.session.IoSessionConfig;
+import org.apache.mina.filter.codec.AbstractProtocolEncoderOutput;
 import org.apache.mina.filter.codec.ProtocolDecoderOutput;
 import org.apache.mina.filter.codec.demux.MessageDecoder;
 import org.apache.mina.filter.codec.demux.MessageEncoder;
-import org.apache.mina.filter.codec.support.SimpleProtocolEncoderOutput;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -87,9 +87,9 @@
     @Test 
     public void testMessageCodec() throws Exception
     {
-        SimpleProtocolEncoderOutput encoderOut = new SimpleProtocolEncoderOutput()
+        AbstractProtocolEncoderOutput encoderOut = new AbstractProtocolEncoderOutput()
         {
-            protected WriteFuture doFlush( ByteBuffer buf )
+            public WriteFuture flush()
             {
                 return null;
             }
@@ -100,7 +100,7 @@
         
         session.setAttribute( "registries", service.getRegistries() );
         encoder.encode( session, message, encoderOut );
-        ByteBuffer buf = encoderOut.getBufferQueue().poll();
+        IoBuffer buf = (IoBuffer)encoderOut.getMessageQueue().poll();
 
         buf.mark();
         Assert.assertTrue( decoder.decodable( null, buf ) == MessageDecoder.OK );
@@ -135,20 +135,17 @@
     }
 
 
-    protected static class DummySession extends BaseIoSession
+    protected static class DummySession extends AbstractIoSession
     {
         Object message;
 
 
-        @Override
-        public WriteFuture write( Object message )
+        public IoProcessor<IoSession> getProcessor()
         {
-            this.message = message;
-
-            return super.write( message );
+            return null;
         }
-
-
+        
+        
         protected Object getMessage()
         {
             return message;
@@ -179,7 +176,7 @@
         }
 
 
-        public TransportType getTransportType()
+        public TransportMetadata getTransportMetadata()
         {
             return null;
         }
@@ -213,17 +210,5 @@
         {
             return null;
         }
-
-
-        public IoServiceConfig getServiceConfig()
-        {
-            return null;
-        }
-
-
-        public int getScheduledWriteBytes()
-        {
-            return 0;
-        }
     }
 }

Modified: directory/apacheds/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/pom.xml?rev=703486&r1=703485&r2=703486&view=diff
==============================================================================
--- directory/apacheds/trunk/pom.xml (original)
+++ directory/apacheds/trunk/pom.xml Fri Oct 10 07:46:51 2008
@@ -74,13 +74,7 @@
       <dependency>
         <groupId>org.apache.mina</groupId>
         <artifactId>mina-core</artifactId>
-        <version>1.1.7</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.mina</groupId>
-        <artifactId>mina-filter-ssl</artifactId>
-        <version>1.1.7</version>
+        <version>2.0.0-M4-SNAPSHOT</version>
       </dependency>
 
       <dependency>
@@ -354,12 +348,12 @@
     <module>core-splay</module>
     <module>core-avl</module>
     <module>protocol-shared</module>
-    <module>protocol-ntp</module>
+    <!--module>protocol-ntp</module-->
     <module>protocol-ldap</module>
-    <module>protocol-kerberos</module>
-    <module>protocol-dhcp</module>
-    <module>protocol-dns</module>
-    <module>protocol-changepw</module>
+    <!--module>protocol-kerberos</module-->
+    <!--module>protocol-dhcp</module-->
+    <!--module>protocol-dns</module-->
+    <!--module>protocol-changepw</module-->
     <module>server-integ</module>
     <module>server-tools</module>
 

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java?rev=703486&r1=703485&r2=703486&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/ChangePasswordServer.java Fri Oct 10 07:46:51 2008
@@ -33,8 +33,6 @@
 import org.apache.directory.server.kerberos.shared.store.DirectoryPrincipalStore;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
 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;
 
@@ -269,18 +267,16 @@
         
         if ( getDatagramAcceptor() != null )
         {
-            DatagramAcceptorConfig udpConfig = new DatagramAcceptorConfig();
-            getDatagramAcceptor().bind( new InetSocketAddress( getIpPort() ),
-                    new ChangePasswordProtocolHandler( this, store ), udpConfig );
+            getDatagramAcceptor().setHandler( new ChangePasswordProtocolHandler( 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 ChangePasswordProtocolHandler( this, store ), tcpConfig );
+            getSocketAcceptor().setCloseOnDeactivation( false );
+            getSocketAcceptor().setReuseAddress( true );
+            getSocketAcceptor().setHandler( new ChangePasswordProtocolHandler( this, store ) );
+            getSocketAcceptor().bind( new InetSocketAddress( getIpPort() ) );
         }
         
         LOG.info( "ChangePassword service started." );

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java?rev=703486&r1=703485&r2=703486&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java Fri Oct 10 07:46:51 2008
@@ -40,10 +40,9 @@
 import org.apache.directory.server.kerberos.shared.messages.ErrorMessageModifier;
 import org.apache.directory.server.kerberos.shared.messages.value.KerberosTime;
 import org.apache.directory.server.kerberos.shared.store.PrincipalStore;
-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;
@@ -79,10 +78,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( ChangePasswordUdpProtocolCodecFactory.getInstance() ) );

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpDecoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpDecoder.java?rev=703486&r1=703485&r2=703486&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpDecoder.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpDecoder.java Fri Oct 10 07:46:51 2008
@@ -22,9 +22,8 @@
 
 
 import org.apache.directory.server.changepw.io.ChangePasswordRequestDecoder;
-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;
 
@@ -74,7 +73,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( 4, maxObjectSize ) )
         {

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpEncoder.java?rev=703486&r1=703485&r2=703486&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpEncoder.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordTcpEncoder.java Fri Oct 10 07:46:51 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;
 
@@ -45,7 +45,7 @@
 
     public void encode( IoSession session, Object message, ProtocolEncoderOutput out ) throws IOException
     {
-        ByteBuffer buf = ByteBuffer.allocate( 512 );
+        IoBuffer buf = IoBuffer.allocate( 512 );
 
         // make space for int length
         buf.putInt( 0 );

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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 2008
@@ -58,14 +58,14 @@
 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.filterchain.IoFilterChain;
+import org.apache.mina.core.service.IoHandler;
+import org.apache.mina.core.service.IoProcessor;
+import org.apache.mina.core.service.IoService;
+import org.apache.mina.core.service.TransportMetadata;
+import org.apache.mina.core.session.AbstractIoSession;
+import org.apache.mina.core.session.IoSession;
+import org.apache.mina.core.session.IoSessionConfig;
 
 
 /**
@@ -328,20 +328,16 @@
         return principalName;
     }
 
-    private static class DummySession extends BaseIoSession
+    private static class DummySession extends AbstractIoSession
     {
         Object message;
 
-
-        @Override
-        public WriteFuture write( Object message )
+        
+        public IoProcessor<IoSession> getProcessor()
         {
-            this.message = message;
-
-            return super.write( message );
+            return null;
         }
 
-
         private Object getMessage()
         {
             return message;
@@ -372,7 +368,7 @@
         }
 
 
-        public TransportType getTransportType()
+        public TransportMetadata getTransportMetadata()
         {
             return null;
         }
@@ -406,17 +402,5 @@
         {
             return null;
         }
-
-
-        public IoServiceConfig getServiceConfig()
-        {
-            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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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;
@@ -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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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( null );
         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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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() ) );

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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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=703486&r1=703485&r2=703486&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 Fri Oct 10 07:46:51 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() );



Mime
View raw message