directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r998484 - in /directory: apacheds/trunk/ apacheds/trunk/protocol-ldap/ apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/ installers/trunk/ shared/trunk/ shared/trunk/all/ shared/trunk/asn1-codec/
Date Sat, 18 Sep 2010 15:33:39 GMT
Author: elecharny
Date: Sat Sep 18 15:33:38 2010
New Revision: 998484

URL: http://svn.apache.org/viewvc?rev=998484&view=rev
Log:
removed the asn1-codec module, it's not anymore needed

Removed:
    directory/shared/trunk/asn1-codec/
Modified:
    directory/apacheds/trunk/pom.xml
    directory/apacheds/trunk/protocol-ldap/pom.xml
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java
    directory/installers/trunk/pom.xml
    directory/shared/trunk/all/pom.xml
    directory/shared/trunk/pom.xml

Modified: directory/apacheds/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/pom.xml?rev=998484&r1=998483&r2=998484&view=diff
==============================================================================
--- directory/apacheds/trunk/pom.xml (original)
+++ directory/apacheds/trunk/pom.xml Sat Sep 18 15:33:38 2010
@@ -412,12 +412,6 @@
       
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
-        <artifactId>shared-asn1-codec</artifactId>
-        <version>${org.apache.directory.shared.version}</version>
-      </dependency>
-      
-      <dependency>
-        <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-dsml-parser</artifactId>
         <version>${org.apache.directory.shared.version}</version>
       </dependency>

Modified: directory/apacheds/trunk/protocol-ldap/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/pom.xml?rev=998484&r1=998483&r2=998484&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/pom.xml (original)
+++ directory/apacheds/trunk/protocol-ldap/pom.xml Sat Sep 18 15:33:38 2010
@@ -81,11 +81,6 @@
     
     <dependency>
       <groupId>org.apache.directory.shared</groupId>
-      <artifactId>shared-asn1-codec</artifactId>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.apache.directory.shared</groupId>
       <artifactId>shared-i18n</artifactId>
     </dependency>
     

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java?rev=998484&r1=998483&r2=998484&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapProtocolCodecFactory.java
Sat Sep 18 15:33:38 2010
@@ -22,15 +22,20 @@ package org.apache.directory.server.ldap
 
 import org.apache.directory.ldap.client.api.protocol.LdapProtocolEncoder;
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.shared.asn1.codec.Asn1CodecDecoder;
+import org.apache.directory.shared.asn1.codec.DecoderException;
+import org.apache.directory.shared.asn1.codec.stateful.DecoderCallback;
+import org.apache.directory.shared.asn1.codec.stateful.StatefulDecoder;
 import org.apache.directory.shared.ldap.message.MessageDecoder;
 import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.apache.mina.core.buffer.IoBuffer;
 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.ProtocolDecoderAdapter;
+import org.apache.mina.filter.codec.ProtocolDecoderOutput;
 import org.apache.mina.filter.codec.ProtocolEncoder;
 
 
@@ -41,6 +46,44 @@ import org.apache.mina.filter.codec.Prot
  */
 final class LdapProtocolCodecFactory implements ProtocolCodecFactory
 {
+    private class Asn1CodecDecoder extends ProtocolDecoderAdapter
+    {
+        /** The stateful decoder */
+        private final StatefulDecoder decoder;
+
+        /** The Output queue */
+        private ProtocolDecoderOutput decOut;
+
+
+        /**
+         * Creates a new instance of Asn1CodecDecoder.
+         * 
+         * @param decoder The associated decoder
+         */
+        public Asn1CodecDecoder( StatefulDecoder decoder )
+        {
+            this.decoder = decoder;
+            this.decoder.setCallback( new DecoderCallback()
+            {
+                public void decodeOccurred( StatefulDecoder decoder, Object decoded )
+                {
+                    decOut.write( decoded );
+                }
+            } );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public void decode( IoSession session, IoBuffer in, ProtocolDecoderOutput out ) throws
DecoderException
+        {
+            decOut = out;
+            decoder.decode( in.buf() );
+        }
+    }
+
+
     /** the directory service for which this factor generates codecs */
     final private DirectoryService directoryService;
 

Modified: directory/installers/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/installers/trunk/pom.xml?rev=998484&r1=998483&r2=998484&view=diff
==============================================================================
--- directory/installers/trunk/pom.xml (original)
+++ directory/installers/trunk/pom.xml Sat Sep 18 15:33:38 2010
@@ -140,12 +140,6 @@
 
       <dependency>
         <groupId>org.apache.directory.shared</groupId>
-        <artifactId>shared-asn1-codec</artifactId>
-        <version>${shared.version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>org.apache.directory.shared</groupId>
         <artifactId>shared-ldap</artifactId>
         <version>${shared.version}</version>
       </dependency>

Modified: directory/shared/trunk/all/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/all/pom.xml?rev=998484&r1=998483&r2=998484&view=diff
==============================================================================
--- directory/shared/trunk/all/pom.xml (original)
+++ directory/shared/trunk/all/pom.xml Sat Sep 18 15:33:38 2010
@@ -36,11 +36,6 @@
 
     <dependency>
       <groupId>${project.groupId}</groupId>
-      <artifactId>shared-asn1-codec</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>${project.groupId}</groupId>
       <artifactId>shared-i18n</artifactId>
     </dependency>
 

Modified: directory/shared/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/pom.xml?rev=998484&r1=998483&r2=998484&view=diff
==============================================================================
--- directory/shared/trunk/pom.xml (original)
+++ directory/shared/trunk/pom.xml Sat Sep 18 15:33:38 2010
@@ -76,7 +76,6 @@
     <module>ldap</module>
     <module>ldap-jndi</module>
     <module>ldap-schema</module>
-    <module>asn1-codec</module>
     <module>ldap-client-api</module>
     <module>dsml-parser</module>
   </modules>
@@ -108,12 +107,6 @@
 
       <dependency>
         <groupId>${project.groupId}</groupId>
-        <artifactId>shared-asn1-codec</artifactId>
-        <version>${project.version}</version>
-      </dependency>
-
-      <dependency>
-        <groupId>${project.groupId}</groupId>
         <artifactId>shared-dsml-parser</artifactId>
         <version>${project.version}</version>
       </dependency>
@@ -157,7 +150,7 @@
       </dependency>
 
       <!-- Commons dependencies -->
-      
+
       <dependency>
         <groupId>commons-collections</groupId>
         <artifactId>commons-collections</artifactId>



Mime
View raw message