directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 37311 - in incubator/directory/ldap/trunk: common common/src/java/org/apache/ldap/common/message common/src/java/org/apache/ldap/common/message/spi snacc-provider snacc-provider/src/java/org/apache/ldap/common/berlib/snacc
Date Wed, 01 Sep 2004 05:36:13 GMT
Author: akarasulu
Date: Tue Aug 31 22:36:13 2004
New Revision: 37311

Added:
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/ProviderDecoder.java
      - copied, changed from rev 37166, incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/DecoderSpi.java
Removed:
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/DecoderSpi.java
Modified:
   incubator/directory/ldap/trunk/common/project.xml
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/MessageDecoder.java
   incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/Provider.java
   incubator/directory/ldap/trunk/snacc-provider/   (props changed)
   incubator/directory/ldap/trunk/snacc-provider/project.xml
   incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/ResultTransform.java
   incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SnaccDecoder.java
   incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SnaccProvider.java
Log:
Altered common and all dependent projects to now make encoders within the
common message framework state driven and chunking.  Not all providers will
support new chunking interfaces such as the snacc provider.


Modified: incubator/directory/ldap/trunk/common/project.xml
==============================================================================
--- incubator/directory/ldap/trunk/common/project.xml	(original)
+++ incubator/directory/ldap/trunk/common/project.xml	Tue Aug 31 22:36:13 2004
@@ -1,120 +1,133 @@
-<?xml version="1.0"?>
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
-	xsi:noNamespaceSchemaLocation="maven-project.xsd">
-	
-    <pomVersion>3</pomVersion>
-    <groupId>incubator-directory</groupId>	
-    <id>ldap-common</id>
-    <name>Common LDAP API</name>
-    <currentVersion>SNAPSHOT</currentVersion>
-    
-    <organization>
-      <name>The Apache Incubator</name>
-      <url>http://incubator.apache.org</url>
-      <logo>/images/apache-incubator-logo.png</logo>
-    </organization>
-
-    <inceptionYear>2003</inceptionYear>
-    <package>org.apache.ldap.common</package>
-    <logo>/images/apache-directory-logo.png</logo>
-    <url>http://incubator.apache.org/directory</url>
-
-    <description>
-	    Common LDAP packages used for protocol compliant parsing of distinguished
-	    names, LDIFs, filters, and urls.  Also contains the Common Message API 
-	    which enables a plugable interface for ASN.1 BER Message codec providers.
-    </description>
-
-    <shortDescription>
-	    Common LDAP packages used by clients and servers.
-    </shortDescription>
-    
-	<dependencies>
-
-		<dependency>
-			<groupId>commons-collections</groupId>
-			<artifactId>commons-collections</artifactId>
-			<version>2.1</version>
-			<url>http://jakarta.apache.org/commons/collections</url>
-		</dependency>
-
-		<dependency>
-			<groupId>commons-lang</groupId>
-			<artifactId>commons-lang</artifactId>
-			<version>2.0</version>
-			<url>http://jakarta.apache.org/commons/lang</url>
-		</dependency>
-
-		<dependency>
-			<groupId>regexp</groupId>
-			<artifactId>regexp</artifactId>
-			<version>1.2</version>
-			<url>http://jakarta.apache.org/regexp/index.html</url>
-		</dependency>
-
-		<dependency>
-			<groupId>antlr</groupId>
-			<artifactId>antlr</artifactId>
-			<version>2.7.2</version>
-			<url>http://antlr.org/</url>
-		</dependency>
-
-	</dependencies>
-    
-    <build>
-      <nagEmailAddress>directory-dev@incubator.apache.org</nagEmailAddress>
-      <sourceDirectory>${basedir}/src/java</sourceDirectory>
-      <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
-      <integrationUnitTestSourceDirectory/>
-      <aspectSourceDirectory/>
-                                                                                
-      <unitTest>
-        <includes>
-          <include>**/*Test*</include>
-          <include>**/*TestCase*</include>
-        </includes>
-                                                                                
-        <excludes>
-            <exclude>**/testutils/*</exclude>
-        </excludes>
-
-        <resources>
-          <resource>
-            <directory>${basedir}/src/test</directory>
-            <includes>
-              <include>**/*.dtd</include>
-              <include>**/*.ldif</include>
-              <include>**/*.properties</include>
-              <include>**/*.x*</include>
-              <include>**/*.mf</include>
-              <include>**/*.jar</include>
-            </includes>
-          </resource>
-                                                                                
-          <resource>
-            <directory>${basedir}/src/test</directory>
-            <includes>
-              <include>**/*.dtd</include>
-              <include>**/*.ldif</include>
-              <include>**/*.properties</include>
-              <include>**/*.x*</include>
-              <include>**/*.mf</include>
-              <include>**/*.jar</include>
-            </includes>
-          </resource>
-        </resources>
-      </unitTest>
-                                                                                
-      <resources>
-        <resource>
-          <directory>${basedir}/src/java</directory>
-          <includes>
-            <include>**/*.dtd</include>
-            <include>**/*.properties</include>
-            <include>**/*.x*</include>
-          </includes>
-        </resource>
-                                                                                
+<?xml version="1.0"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+	xsi:noNamespaceSchemaLocation="maven-project.xsd">
+	
+    <pomVersion>3</pomVersion>
+    <groupId>incubator-directory</groupId>	
+    <id>ldap-common</id>
+    <name>Common LDAP API</name>
+    <currentVersion>SNAPSHOT</currentVersion>
+    
+    <organization>
+      <name>The Apache Incubator</name>
+      <url>http://incubator.apache.org</url>
+      <logo>/images/apache-incubator-logo.png</logo>
+    </organization>
+
+    <inceptionYear>2003</inceptionYear>
+    <package>org.apache.ldap.common</package>
+    <logo>/images/apache-directory-logo.png</logo>
+    <url>http://incubator.apache.org/directory</url>
+
+    <description>
+	    Common LDAP packages used for protocol compliant parsing of distinguished
+	    names, LDIFs, filters, and urls.  Also contains the Common Message API 
+	    which enables a plugable interface for ASN.1 BER Message codec providers.
+    </description>
+
+    <shortDescription>
+	    Common LDAP packages used by clients and servers.
+    </shortDescription>
+    
+	<dependencies>
+
+		<dependency>
+			<groupId>commons-collections</groupId>
+			<artifactId>commons-collections</artifactId>
+			<version>2.1</version>
+			<url>http://jakarta.apache.org/commons/collections</url>
+		</dependency>
+
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.0</version>
+      <url>http://jakarta.apache.org/commons/lang</url>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-codec</groupId>
+      <artifactId>commons-codec</artifactId>
+      <version>SNAPSHOT</version>
+      <url>http://jakarta.apache.org/commons/codec</url>
+    </dependency>
+
+		<dependency>
+			<groupId>regexp</groupId>
+			<artifactId>regexp</artifactId>
+			<version>1.2</version>
+			<url>http://jakarta.apache.org/regexp/index.html</url>
+		</dependency>
+
+		<dependency>
+			<groupId>antlr</groupId>
+			<artifactId>antlr</artifactId>
+			<version>2.7.2</version>
+			<url>http://antlr.org/</url>
+		</dependency>
+
+    <dependency>
+      <groupId>incubator-directory</groupId>
+      <artifactId>codec-stateful</artifactId>
+      <version>SNAPSHOT</version>
+    </dependency>
+
+	</dependencies>
+    
+    <build>
+      <nagEmailAddress>directory-dev@incubator.apache.org</nagEmailAddress>
+      <sourceDirectory>${basedir}/src/java</sourceDirectory>
+      <unitTestSourceDirectory>${basedir}/src/test</unitTestSourceDirectory>
+      <integrationUnitTestSourceDirectory/>
+      <aspectSourceDirectory/>
+                                                                                
+      <unitTest>
+        <includes>
+          <include>**/*Test*</include>
+          <include>**/*TestCase*</include>
+        </includes>
+                                                                                
+        <excludes>
+            <exclude>**/testutils/*</exclude>
+        </excludes>
+
+        <resources>
+          <resource>
+            <directory>${basedir}/src/test</directory>
+            <includes>
+              <include>**/*.dtd</include>
+              <include>**/*.ldif</include>
+              <include>**/*.properties</include>
+              <include>**/*.x*</include>
+              <include>**/*.mf</include>
+              <include>**/*.jar</include>
+            </includes>
+          </resource>
+                                                                                
+          <resource>
+            <directory>${basedir}/src/test</directory>
+            <includes>
+              <include>**/*.dtd</include>
+              <include>**/*.ldif</include>
+              <include>**/*.properties</include>
+              <include>**/*.x*</include>
+              <include>**/*.mf</include>
+              <include>**/*.jar</include>
+            </includes>
+          </resource>
+        </resources>
+      </unitTest>
+                                                                                
+      <resources>
+        <resource>
+          <directory>${basedir}/src/java</directory>
+          <includes>
+            <include>**/*.dtd</include>
+            <include>**/*.properties</include>
+            <include>**/*.x*</include>
+          </includes>
+        </resource>
+                                                                                
         <resource>
           <directory>${basedir}/conf</directory>
           <targetPath>BLOCK-INF</targetPath>
@@ -122,7 +135,7 @@
             <include>block.xml</include>
           </includes>
         </resource>
-
+
         <resource>
           <directory>${basedir}/src/java/org/apache/ldap/common/name</directory>
            <targetPath>org/apache/ldap/common/name</targetPath>

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/MessageDecoder.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/MessageDecoder.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/MessageDecoder.java	Tue Aug 31 22:36:13 2004
@@ -1,193 +1,5 @@
 /*
- *                                 Apache License
- *                           Version 2.0, January 2004
- *                        http://www.apache.org/licenses/
- *
- *   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- *
- *   1. Definitions.
- *
- *      "License" shall mean the terms and conditions for use, reproduction,
- *      and distribution as defined by Sections 1 through 9 of this document.
- *
- *      "Licensor" shall mean the copyright owner or entity authorized by
- *      the copyright owner that is granting the License.
- *
- *      "Legal Entity" shall mean the union of the acting entity and all
- *      other entities that control, are controlled by, or are under common
- *      control with that entity. For the purposes of this definition,
- *      "control" means (i) the power, direct or indirect, to cause the
- *      direction or management of such entity, whether by contract or
- *      otherwise, or (ii) ownership of fifty percent (50%) or more of the
- *      outstanding shares, or (iii) beneficial ownership of such entity.
- *
- *      "You" (or "Your") shall mean an individual or Legal Entity
- *      exercising permissions granted by this License.
- *
- *      "Source" form shall mean the preferred form for making modifications,
- *      including but not limited to software source code, documentation
- *      source, and configuration files.
- *
- *      "Object" form shall mean any form resulting from mechanical
- *      transformation or translation of a Source form, including but
- *      not limited to compiled object code, generated documentation,
- *      and conversions to other media types.
- *
- *      "Work" shall mean the work of authorship, whether in Source or
- *      Object form, made available under the License, as indicated by a
- *      copyright notice that is included in or attached to the work
- *      (an example is provided in the Appendix below).
- *
- *      "Derivative Works" shall mean any work, whether in Source or Object
- *      form, that is based on (or derived from) the Work and for which the
- *      editorial revisions, annotations, elaborations, or other modifications
- *      represent, as a whole, an original work of authorship. For the purposes
- *      of this License, Derivative Works shall not include works that remain
- *      separable from, or merely link (or bind by name) to the interfaces of,
- *      the Work and Derivative Works thereof.
- *
- *      "Contribution" shall mean any work of authorship, including
- *      the original version of the Work and any modifications or additions
- *      to that Work or Derivative Works thereof, that is intentionally
- *      submitted to Licensor for inclusion in the Work by the copyright owner
- *      or by an individual or Legal Entity authorized to submit on behalf of
- *      the copyright owner. For the purposes of this definition, "submitted"
- *      means any form of electronic, verbal, or written communication sent
- *      to the Licensor or its representatives, including but not limited to
- *      communication on electronic mailing lists, source code control systems,
- *      and issue tracking systems that are managed by, or on behalf of, the
- *      Licensor for the purpose of discussing and improving the Work, but
- *      excluding communication that is conspicuously marked or otherwise
- *      designated in writing by the copyright owner as "Not a Contribution."
- *
- *      "Contributor" shall mean Licensor and any individual or Legal Entity
- *      on behalf of whom a Contribution has been received by Licensor and
- *      subsequently incorporated within the Work.
- *
- *   2. Grant of Copyright License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      copyright license to reproduce, prepare Derivative Works of,
- *      publicly display, publicly perform, sublicense, and distribute the
- *      Work and such Derivative Works in Source or Object form.
- *
- *   3. Grant of Patent License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      (except as stated in this section) patent license to make, have made,
- *      use, offer to sell, sell, import, and otherwise transfer the Work,
- *      where such license applies only to those patent claims licensable
- *      by such Contributor that are necessarily infringed by their
- *      Contribution(s) alone or by combination of their Contribution(s)
- *      with the Work to which such Contribution(s) was submitted. If You
- *      institute patent litigation against any entity (including a
- *      cross-claim or counterclaim in a lawsuit) alleging that the Work
- *      or a Contribution incorporated within the Work constitutes direct
- *      or contributory patent infringement, then any patent licenses
- *      granted to You under this License for that Work shall terminate
- *      as of the date such litigation is filed.
- *
- *   4. Redistribution. You may reproduce and distribute copies of the
- *      Work or Derivative Works thereof in any medium, with or without
- *      modifications, and in Source or Object form, provided that You
- *      meet the following conditions:
- *
- *      (a) You must give any other recipients of the Work or
- *          Derivative Works a copy of this License; and
- *
- *      (b) You must cause any modified files to carry prominent notices
- *          stating that You changed the files; and
- *
- *      (c) You must retain, in the Source form of any Derivative Works
- *          that You distribute, all copyright, patent, trademark, and
- *          attribution notices from the Source form of the Work,
- *          excluding those notices that do not pertain to any part of
- *          the Derivative Works; and
- *
- *      (d) If the Work includes a "NOTICE" text file as part of its
- *          distribution, then any Derivative Works that You distribute must
- *          include a readable copy of the attribution notices contained
- *          within such NOTICE file, excluding those notices that do not
- *          pertain to any part of the Derivative Works, in at least one
- *          of the following places: within a NOTICE text file distributed
- *          as part of the Derivative Works; within the Source form or
- *          documentation, if provided along with the Derivative Works; or,
- *          within a display generated by the Derivative Works, if and
- *          wherever such third-party notices normally appear. The contents
- *          of the NOTICE file are for informational purposes only and
- *          do not modify the License. You may add Your own attribution
- *          notices within Derivative Works that You distribute, alongside
- *          or as an addendum to the NOTICE text from the Work, provided
- *          that such additional attribution notices cannot be construed
- *          as modifying the License.
- *
- *      You may add Your own copyright statement to Your modifications and
- *      may provide additional or different license terms and conditions
- *      for use, reproduction, or distribution of Your modifications, or
- *      for any such Derivative Works as a whole, provided Your use,
- *      reproduction, and distribution of the Work otherwise complies with
- *      the conditions stated in this License.
- *
- *   5. Submission of Contributions. Unless You explicitly state otherwise,
- *      any Contribution intentionally submitted for inclusion in the Work
- *      by You to the Licensor shall be under the terms and conditions of
- *      this License, without any additional terms or conditions.
- *      Notwithstanding the above, nothing herein shall supersede or modify
- *      the terms of any separate license agreement you may have executed
- *      with Licensor regarding such Contributions.
- *
- *   6. Trademarks. This License does not grant permission to use the trade
- *      names, trademarks, service marks, or product names of the Licensor,
- *      except as required for reasonable and customary use in describing the
- *      origin of the Work and reproducing the content of the NOTICE file.
- *
- *   7. Disclaimer of Warranty. Unless required by applicable law or
- *      agreed to in writing, Licensor provides the Work (and each
- *      Contributor provides its Contributions) on an "AS IS" BASIS,
- *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- *      implied, including, without limitation, any warranties or conditions
- *      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- *      PARTICULAR PURPOSE. You are solely responsible for determining the
- *      appropriateness of using or redistributing the Work and assume any
- *      risks associated with Your exercise of permissions under this License.
- *
- *   8. Limitation of Liability. In no event and under no legal theory,
- *      whether in tort (including negligence), contract, or otherwise,
- *      unless required by applicable law (such as deliberate and grossly
- *      negligent acts) or agreed to in writing, shall any Contributor be
- *      liable to You for damages, including any direct, indirect, special,
- *      incidental, or consequential damages of any character arising as a
- *      result of this License or out of the use or inability to use the
- *      Work (including but not limited to damages for loss of goodwill,
- *      work stoppage, computer failure or malfunction, or any and all
- *      other commercial damages or losses), even if such Contributor
- *      has been advised of the possibility of such damages.
- *
- *   9. Accepting Warranty or Additional Liability. While redistributing
- *      the Work or Derivative Works thereof, You may choose to offer,
- *      and charge a fee for, acceptance of support, warranty, indemnity,
- *      or other liability obligations and/or rights consistent with this
- *      License. However, in accepting such obligations, You may act only
- *      on Your own behalf and on Your sole responsibility, not on behalf
- *      of any other Contributor, and only if You agree to indemnify,
- *      defend, and hold each Contributor harmless for any liability
- *      incurred by, or claims asserted against, such Contributor by reason
- *      of your accepting any such warranty or additional liability.
- *
- *   END OF TERMS AND CONDITIONS
- *
- *   APPENDIX: How to apply the Apache License to your work.
- *
- *      To apply the Apache License to your work, attach the following
- *      boilerplate notice, with the fields enclosed by brackets "[]"
- *      replaced with your own identifying information. (Don't include
- *      the brackets!)  The text should be enclosed in the appropriate
- *      comment syntax for the file format. We also recommend that a
- *      file or class name and description of purpose be included on the
- *      same "printed page" as the copyright notice for easier
- *      identification within third-party archives.
- *
- *   Copyright [yyyy] [name of copyright owner]
+ *   Copyright 2004 The Apache Software Foundation
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -202,45 +14,42 @@
  *   limitations under the License.
  *
  */
-
-/*
- * $Id: MessageDecoder.java,v 1.7 2003/07/31 21:44:48 akarasulu Exp $
- *
- * -- (c) LDAPd Group                                                    --
- * -- Please refer to the LICENSE.txt file in the root directory of      --
- * -- any LDAPd project for copyright and distribution information.      --
- *
- */
-
 package org.apache.ldap.common.message;
 
 
-import java.io.InputStream ;
-import java.util.Properties ;
+import java.io.InputStream;
+import java.util.Properties;
 
-import org.apache.ldap.common.message.spi.Provider ;
-import org.apache.ldap.common.message.spi.DecoderSpi ;
-import org.apache.ldap.common.message.spi.TransformerSpi ;
+import org.apache.ldap.common.message.spi.Provider;
+import org.apache.ldap.common.message.spi.TransformerSpi;
+import org.apache.ldap.common.message.spi.ProviderDecoder;
+
+import org.apache.commons.codec.DecoderException;
+import org.apache.commons.codec.stateful.DecoderMonitor;
+import org.apache.commons.codec.stateful.DecoderCallback;
+import org.apache.commons.codec.stateful.StatefulDecoder;
 
 
 /**
  * Decodes a BER encoded LDAPv3 message envelope from an input stream
  * demarshaling it into a Message instance using a BER library provider.
  *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author: akarasulu $
- * @version $Revision: 1.7 $
+ * @author <a href="mailto:directory-dev@incubator.apache.org"> Apache Directory
+ *         Project</a>
+ * @version $Rev$
  */
-public final class MessageDecoder
+public final class MessageDecoder implements StatefulDecoder
 {
     /** Environment parameters stored here */
     private final Properties env;
     /** the ASN.1 provider */
     private final Provider provider;
     /** the ASN.1 provider's decoder */
-        private final DecoderSpi decoder;
+    private final ProviderDecoder decoder;
     /** the ASN.1 provider's transformer */
     private final TransformerSpi transformer;
+    /** the Message decode operation callback */
+    private DecoderCallback cb;
 
 
     /**
@@ -268,6 +77,14 @@
         provider = Provider.getProvider( env );
         decoder = provider.getDecoder();
         transformer = provider.getTransformer();
+        decoder.setCallback( new DecoderCallback()
+        {
+            public void decodeOccurred( StatefulDecoder decoder,
+                                        Object decoded )
+            {
+                cb.decodeOccurred( decoder, transformer.transform( decoded ) );
+            }
+        });
     }
 
 
@@ -310,5 +127,46 @@
         message.setLocked( true );
 
         return message;
+    }
+
+
+    /**
+     * @todo doc me!
+     *
+     * @param chunk
+     * @throws MessageException
+     */
+    public void decode( Object chunk ) throws MessageException
+    {
+        try
+        {
+            decoder.decode( chunk );
+        }
+        catch ( DecoderException e )
+        {
+            throw new MessageException( "decoder failture: " + e.getMessage() );
+        }
+    }
+
+
+    /**
+     * @todo doc me!
+     *
+     * @param cb
+     */
+    public void setCallback( DecoderCallback cb )
+    {
+        this.cb = cb;
+    }
+
+
+    /**
+     * @todo doc me!
+     *
+     * @param monitor
+     */
+    public void setDecoderMonitor( DecoderMonitor monitor )
+    {
+        decoder.setDecoderMonitor( monitor );
     }
 }

Modified: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/Provider.java
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/Provider.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/Provider.java	Tue Aug 31 22:36:13 2004
@@ -321,7 +321,7 @@
      * @return the provider's decoder.
      * @throws ProviderException if the provider or its decoder cannot be found
      */
-    public abstract DecoderSpi getDecoder() throws ProviderException ;
+    public abstract ProviderDecoder getDecoder() throws ProviderException ;
 
 
     /**

Copied: incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/ProviderDecoder.java (from rev 37166, incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/DecoderSpi.java)
==============================================================================
--- incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/DecoderSpi.java	(original)
+++ incubator/directory/ldap/trunk/common/src/java/org/apache/ldap/common/message/spi/ProviderDecoder.java	Tue Aug 31 22:36:13 2004
@@ -202,9 +202,9 @@
  *   limitations under the License.
  *
  */
-
+
 /*
- * $Id: DecoderSpi.java,v 1.2 2003/04/22 14:54:55 akarasulu Exp $
+ * $Id: Decoder.java,v 1.2 2003/04/22 14:54:55 akarasulu Exp $
  *
  * -- (c) LDAPd Group                                                    --
  * -- Please refer to the LICENSE.txt file in the root directory of      --
@@ -215,6 +215,8 @@
 package org.apache.ldap.common.message.spi ;
 
 
+import org.apache.commons.codec.stateful.StatefulDecoder;
+
 import java.io.InputStream ;
 
 
@@ -223,11 +225,11 @@
  * compiler stub based containment tree for a provider are expected to implement
  * this interface.
  *
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author: akarasulu $
- * @version $Revision: 1.2 $
+ * @author <a href="mailto:directory-dev@incubator.apache.org"> Apache Directory
+ *         Project</a>
+ * @version $Rev$
  */
-public interface DecoderSpi extends ProviderObject
+public interface ProviderDecoder extends ProviderObject, StatefulDecoder
 {
     /**
      * Decodes a BER encoded LDAPv3 ASN.1 message envelope from a binary input
@@ -244,6 +246,5 @@
      * exceptions encountered while decoding can be held within this subclass
      * of MultiException.
      */
-    Object decode( Object a_lock, InputStream a_in )
-        throws ProviderException ;
+    Object decode( Object a_lock, InputStream a_in ) throws ProviderException;
 }

Modified: incubator/directory/ldap/trunk/snacc-provider/project.xml
==============================================================================
--- incubator/directory/ldap/trunk/snacc-provider/project.xml	(original)
+++ incubator/directory/ldap/trunk/snacc-provider/project.xml	Tue Aug 31 22:36:13 2004
@@ -30,12 +30,17 @@
     
 	<dependencies>
 
-		<dependency>
-			<groupId>incubator-directory</groupId>
-			<artifactId>ldap-common</artifactId>
-			<version>SNAPSHOT</version>
-			<url>http://ldapd.sourceforge.net</url>
-		</dependency>
+    <dependency>
+      <groupId>incubator-directory</groupId>
+      <artifactId>ldap-common</artifactId>
+      <version>SNAPSHOT</version>
+    </dependency>
+
+    <dependency>
+      <groupId>incubator-directory</groupId>
+      <artifactId>codec-stateful</artifactId>
+      <version>SNAPSHOT</version>
+    </dependency>
 
 		<dependency>
 			<groupId>snacc4j</groupId>
@@ -51,38 +56,45 @@
 			<url>http://jakarta.apache.org/commons/collections.html</url>
 		</dependency>
 
-		<dependency>
-			<groupId>commons-lang</groupId>
-			<artifactId>commons-lang</artifactId>
-			<version>2.0</version>
-			<url>http://jakarta.apache.org/commons/lang</url>
-		</dependency>
+    <dependency>
+      <groupId>commons-lang</groupId>
+      <artifactId>commons-lang</artifactId>
+      <version>2.0</version>
+      <url>http://jakarta.apache.org/commons/lang</url>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-codec</groupId>
+      <artifactId>commons-codec</artifactId>
+      <version>SNAPSHOT</version>
+      <url>http://jakarta.apache.org/commons/codec</url>
+    </dependency>
 
 	</dependencies>
     
     <build>
-        <nagEmailAddress>ldapd-devel@sourceforge.net</nagEmailAddress>
-        <sourceDirectory>${basedir}/src/java</sourceDirectory>
-        <sourceModifications/>
-        <unitTestSourceDirectory/>
-        <integrationUnitTestSourceDirectory/>
-        <aspectSourceDirectory/>
-        <unitTest/>
+      <nagEmailAddress>ldapd-devel@sourceforge.net</nagEmailAddress>
+      <sourceDirectory>${basedir}/src/java</sourceDirectory>
+      <sourceModifications/>
+      <unitTestSourceDirectory/>
+      <integrationUnitTestSourceDirectory/>
+      <aspectSourceDirectory/>
+      <unitTest/>
     </build>
     
     <reports>
-        <report>maven-changelog-plugin</report>
-        <report>maven-developer-activity-plugin</report>
-        <report>maven-file-activity-plugin</report>
-        <report>maven-javadoc-plugin</report>
-		<report>maven-changes-plugin</report>
-		<report>maven-checkstyle-plugin</report>
-		<report>maven-file-activity-plugin</report>
-		<report>maven-javadoc-plugin</report>
-		<report>maven-jdepend-plugin</report>
-		<report>maven-jxr-plugin</report>
-		<report>maven-license-plugin</report>
-		<report>maven-tasklist-plugin</report>
+      <report>maven-changelog-plugin</report>
+      <report>maven-developer-activity-plugin</report>
+      <report>maven-file-activity-plugin</report>
+      <report>maven-javadoc-plugin</report>
+      <report>maven-changes-plugin</report>
+      <report>maven-checkstyle-plugin</report>
+      <report>maven-file-activity-plugin</report>
+      <report>maven-javadoc-plugin</report>
+      <report>maven-jdepend-plugin</report>
+      <report>maven-jxr-plugin</report>
+      <report>maven-license-plugin</report>
+      <report>maven-tasklist-plugin</report>
     </reports>
     
 </project>

Modified: incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/ResultTransform.java
==============================================================================
--- incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/ResultTransform.java	(original)
+++ incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/ResultTransform.java	Tue Aug 31 22:36:13 2004
@@ -1,193 +1,5 @@
 /*
- *                                 Apache License
- *                           Version 2.0, January 2004
- *                        http://www.apache.org/licenses/
- *
- *   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- *
- *   1. Definitions.
- *
- *      "License" shall mean the terms and conditions for use, reproduction,
- *      and distribution as defined by Sections 1 through 9 of this document.
- *
- *      "Licensor" shall mean the copyright owner or entity authorized by
- *      the copyright owner that is granting the License.
- *
- *      "Legal Entity" shall mean the union of the acting entity and all
- *      other entities that control, are controlled by, or are under common
- *      control with that entity. For the purposes of this definition,
- *      "control" means (i) the power, direct or indirect, to cause the
- *      direction or management of such entity, whether by contract or
- *      otherwise, or (ii) ownership of fifty percent (50%) or more of the
- *      outstanding shares, or (iii) beneficial ownership of such entity.
- *
- *      "You" (or "Your") shall mean an individual or Legal Entity
- *      exercising permissions granted by this License.
- *
- *      "Source" form shall mean the preferred form for making modifications,
- *      including but not limited to software source code, documentation
- *      source, and configuration files.
- *
- *      "Object" form shall mean any form resulting from mechanical
- *      transformation or translation of a Source form, including but
- *      not limited to compiled object code, generated documentation,
- *      and conversions to other media types.
- *
- *      "Work" shall mean the work of authorship, whether in Source or
- *      Object form, made available under the License, as indicated by a
- *      copyright notice that is included in or attached to the work
- *      (an example is provided in the Appendix below).
- *
- *      "Derivative Works" shall mean any work, whether in Source or Object
- *      form, that is based on (or derived from) the Work and for which the
- *      editorial revisions, annotations, elaborations, or other modifications
- *      represent, as a whole, an original work of authorship. For the purposes
- *      of this License, Derivative Works shall not include works that remain
- *      separable from, or merely link (or bind by name) to the interfaces of,
- *      the Work and Derivative Works thereof.
- *
- *      "Contribution" shall mean any work of authorship, including
- *      the original version of the Work and any modifications or additions
- *      to that Work or Derivative Works thereof, that is intentionally
- *      submitted to Licensor for inclusion in the Work by the copyright owner
- *      or by an individual or Legal Entity authorized to submit on behalf of
- *      the copyright owner. For the purposes of this definition, "submitted"
- *      means any form of electronic, verbal, or written communication sent
- *      to the Licensor or its representatives, including but not limited to
- *      communication on electronic mailing lists, source code control systems,
- *      and issue tracking systems that are managed by, or on behalf of, the
- *      Licensor for the purpose of discussing and improving the Work, but
- *      excluding communication that is conspicuously marked or otherwise
- *      designated in writing by the copyright owner as "Not a Contribution."
- *
- *      "Contributor" shall mean Licensor and any individual or Legal Entity
- *      on behalf of whom a Contribution has been received by Licensor and
- *      subsequently incorporated within the Work.
- *
- *   2. Grant of Copyright License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      copyright license to reproduce, prepare Derivative Works of,
- *      publicly display, publicly perform, sublicense, and distribute the
- *      Work and such Derivative Works in Source or Object form.
- *
- *   3. Grant of Patent License. Subject to the terms and conditions of
- *      this License, each Contributor hereby grants to You a perpetual,
- *      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- *      (except as stated in this section) patent license to make, have made,
- *      use, offer to sell, sell, import, and otherwise transfer the Work,
- *      where such license applies only to those patent claims licensable
- *      by such Contributor that are necessarily infringed by their
- *      Contribution(s) alone or by combination of their Contribution(s)
- *      with the Work to which such Contribution(s) was submitted. If You
- *      institute patent litigation against any entity (including a
- *      cross-claim or counterclaim in a lawsuit) alleging that the Work
- *      or a Contribution incorporated within the Work constitutes direct
- *      or contributory patent infringement, then any patent licenses
- *      granted to You under this License for that Work shall terminate
- *      as of the date such litigation is filed.
- *
- *   4. Redistribution. You may reproduce and distribute copies of the
- *      Work or Derivative Works thereof in any medium, with or without
- *      modifications, and in Source or Object form, provided that You
- *      meet the following conditions:
- *
- *      (a) You must give any other recipients of the Work or
- *          Derivative Works a copy of this License; and
- *
- *      (b) You must cause any modified files to carry prominent notices
- *          stating that You changed the files; and
- *
- *      (c) You must retain, in the Source form of any Derivative Works
- *          that You distribute, all copyright, patent, trademark, and
- *          attribution notices from the Source form of the Work,
- *          excluding those notices that do not pertain to any part of
- *          the Derivative Works; and
- *
- *      (d) If the Work includes a "NOTICE" text file as part of its
- *          distribution, then any Derivative Works that You distribute must
- *          include a readable copy of the attribution notices contained
- *          within such NOTICE file, excluding those notices that do not
- *          pertain to any part of the Derivative Works, in at least one
- *          of the following places: within a NOTICE text file distributed
- *          as part of the Derivative Works; within the Source form or
- *          documentation, if provided along with the Derivative Works; or,
- *          within a display generated by the Derivative Works, if and
- *          wherever such third-party notices normally appear. The contents
- *          of the NOTICE file are for informational purposes only and
- *          do not modify the License. You may add Your own attribution
- *          notices within Derivative Works that You distribute, alongside
- *          or as an addendum to the NOTICE text from the Work, provided
- *          that such additional attribution notices cannot be construed
- *          as modifying the License.
- *
- *      You may add Your own copyright statement to Your modifications and
- *      may provide additional or different license terms and conditions
- *      for use, reproduction, or distribution of Your modifications, or
- *      for any such Derivative Works as a whole, provided Your use,
- *      reproduction, and distribution of the Work otherwise complies with
- *      the conditions stated in this License.
- *
- *   5. Submission of Contributions. Unless You explicitly state otherwise,
- *      any Contribution intentionally submitted for inclusion in the Work
- *      by You to the Licensor shall be under the terms and conditions of
- *      this License, without any additional terms or conditions.
- *      Notwithstanding the above, nothing herein shall supersede or modify
- *      the terms of any separate license agreement you may have executed
- *      with Licensor regarding such Contributions.
- *
- *   6. Trademarks. This License does not grant permission to use the trade
- *      names, trademarks, service marks, or product names of the Licensor,
- *      except as required for reasonable and customary use in describing the
- *      origin of the Work and reproducing the content of the NOTICE file.
- *
- *   7. Disclaimer of Warranty. Unless required by applicable law or
- *      agreed to in writing, Licensor provides the Work (and each
- *      Contributor provides its Contributions) on an "AS IS" BASIS,
- *      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- *      implied, including, without limitation, any warranties or conditions
- *      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- *      PARTICULAR PURPOSE. You are solely responsible for determining the
- *      appropriateness of using or redistributing the Work and assume any
- *      risks associated with Your exercise of permissions under this License.
- *
- *   8. Limitation of Liability. In no event and under no legal theory,
- *      whether in tort (including negligence), contract, or otherwise,
- *      unless required by applicable law (such as deliberate and grossly
- *      negligent acts) or agreed to in writing, shall any Contributor be
- *      liable to You for damages, including any direct, indirect, special,
- *      incidental, or consequential damages of any character arising as a
- *      result of this License or out of the use or inability to use the
- *      Work (including but not limited to damages for loss of goodwill,
- *      work stoppage, computer failure or malfunction, or any and all
- *      other commercial damages or losses), even if such Contributor
- *      has been advised of the possibility of such damages.
- *
- *   9. Accepting Warranty or Additional Liability. While redistributing
- *      the Work or Derivative Works thereof, You may choose to offer,
- *      and charge a fee for, acceptance of support, warranty, indemnity,
- *      or other liability obligations and/or rights consistent with this
- *      License. However, in accepting such obligations, You may act only
- *      on Your own behalf and on Your sole responsibility, not on behalf
- *      of any other Contributor, and only if You agree to indemnify,
- *      defend, and hold each Contributor harmless for any liability
- *      incurred by, or claims asserted against, such Contributor by reason
- *      of your accepting any such warranty or additional liability.
- *
- *   END OF TERMS AND CONDITIONS
- *
- *   APPENDIX: How to apply the Apache License to your work.
- *
- *      To apply the Apache License to your work, attach the following
- *      boilerplate notice, with the fields enclosed by brackets "[]"
- *      replaced with your own identifying information. (Don't include
- *      the brackets!)  The text should be enclosed in the appropriate
- *      comment syntax for the file format. We also recommend that a
- *      file or class name and description of purpose be included on the
- *      same "printed page" as the copyright notice for easier
- *      identification within third-party archives.
- *
- *   Copyright [yyyy] [name of copyright owner]
+ *   Copyright 2004 The Apache Software Foundation
  *
  *   Licensed under the Apache License, Version 2.0 (the "License");
  *   you may not use this file except in compliance with the License.
@@ -202,105 +14,93 @@
  *   limitations under the License.
  *
  */
-
-/*
- * $Id: ResultTransform.java,v 1.3 2003/05/11 07:43:48 akarasulu Exp $
- *
- * -- (c) LDAPd Group                                                    --
- * -- Please refer to the LICENSE.txt file in the root directory of      --
- * -- any LDAPd project for copyright and distribution information.      --
- *
- */
-
 package org.apache.ldap.common.berlib.snacc ;
 
 
 import org.apache.ldap.common.message.LdapResult ;
 import org.apache.ldap.common.message.spi.ProviderException ;
 import org.apache.ldap.common.berlib.snacc.ldap_v3.LDAPResult ;
-import org.apache.ldap.common.message.Response;
+
+import org.apache.ldap.common.Lockable;
+import org.apache.ldap.common.message.ResultCodeEnum;
 import org.apache.ldap.common.message.LdapResultImpl;
 import org.apache.ldap.common.berlib.snacc.ldap_v3.LDAPResultEnum;
-import org.apache.ldap.common.message.ResultCodeEnum;
-import org.apache.ldap.common.Lockable;
 
 
 /**
  * Provides transformation functions for LdapResult structures back and forth
  * from snacc PDUs to the Ldapd representation.
  * 
- * @author <a href="mailto:aok123@bellsouth.net">Alex Karasulu</a>
- * @author $Author: akarasulu $
- * @version $Revision: 1.3 $
+ * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
+ * @version $Rev$
  */
 public class ResultTransform
 {
-    static LdapResult transformFromSnacc( Lockable a_parent,
-        LDAPResult a_snaccResult ) throws ProviderException
+    static LdapResult transformFromSnacc( Lockable parent,
+                                          LDAPResult snaccResult )
+            throws ProviderException
     {
-        LdapResult l_result = new LdapResultImpl( a_parent ) ;
+        LdapResult result = new LdapResultImpl( parent ) ;
 
         // Set the error message if one was generated
-        if( a_snaccResult.errorMessage != null )
+        if( snaccResult.errorMessage != null )
         {
-         l_result.setErrorMessage( new String(
-                a_snaccResult.errorMessage ) ) ;
+            result.setErrorMessage( new String( snaccResult.errorMessage ) ) ;
         }
 
         // Set the reverals if one was generated
-        if( a_snaccResult.referral != null )
+        if( snaccResult.referral != null )
         {
-            ReferralTransform.transformAdd( l_result,
-                a_snaccResult.referral ) ;
+            ReferralTransform.transformAdd( result, snaccResult.referral ) ;
         }
 
         // Set the last matched distinguished name if it is not null or the
         // empty string.  Anonymous authentic uses the empty string DN.
-        byte [] l_dn = a_snaccResult.matchedDN ;
-        if( l_dn == null )
+        byte [] dn = snaccResult.matchedDN ;
+        if( dn == null )
         {
-         l_result.setMatchedDn( "" ) ;
+            result.setMatchedDn( "" ) ;
         }
 	    else
         {
-            l_result.setMatchedDn( new String( l_dn ) ) ;
+            result.setMatchedDn( new String( dn ) ) ;
         }
 
         // Set the result code
-        LDAPResultEnum l_snaccCode = a_snaccResult.resultCode ;
-        ResultCodeEnum l_resultCode =
-            ResultCodeEnum.getResultCodeEnum( l_snaccCode.value ) ;
-        l_result.setResultCode( l_resultCode ) ;
+        LDAPResultEnum snaccCode = snaccResult.resultCode ;
+        ResultCodeEnum resultCode =
+                ResultCodeEnum.getResultCodeEnum( snaccCode.value ) ;
+        result.setResultCode( resultCode ) ;
 
-        return l_result ;
+        return result ;
     }
 
 
-    static void transformToSnacc( LDAPResult a_snaccResult,
-        LdapResult a_result ) throws ProviderException
+    static void transformToSnacc( LDAPResult snaccResult, LdapResult result )
+            throws ProviderException
     {
         // Set the resultCode
-	    LDAPResultEnum l_snaccResultEnum = new LDAPResultEnum() ;
-        a_snaccResult.resultCode = l_snaccResultEnum ;
-	    l_snaccResultEnum.value = a_result.getResultCode().getValue() ;
+	    LDAPResultEnum snaccResultEnum = new LDAPResultEnum() ;
+        snaccResult.resultCode = snaccResultEnum ;
+	    snaccResultEnum.value = result.getResultCode().getValue() ;
 
         // Set the error message if one exists
-        if( a_result.getErrorMessage() == null )
+        if( result.getErrorMessage() == null )
         {
-            a_snaccResult.errorMessage = "".getBytes() ;
+            snaccResult.errorMessage = "".getBytes() ;
         }
         else
 	    {
-            a_snaccResult.errorMessage =
-                a_result.getErrorMessage().getBytes() ;
+            snaccResult.errorMessage =
+                result.getErrorMessage().getBytes() ;
         }
 
         // Set the matched DN parameter
-        a_snaccResult.matchedDN =
-            a_result.getMatchedDn().getBytes() ;
+        snaccResult.matchedDN =
+            result.getMatchedDn().getBytes() ;
 
         // Set the referrals
-        a_snaccResult.referral = ReferralTransform.transform(
-            a_result.getReferral() ) ;
+        snaccResult.referral = ReferralTransform.transform(
+            result.getReferral() ) ;
     }
 }

Modified: incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SnaccDecoder.java
==============================================================================
--- incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SnaccDecoder.java	(original)
+++ incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SnaccDecoder.java	Tue Aug 31 22:36:13 2004
@@ -218,10 +218,13 @@
 import java.io.InputStream ;
 
 import org.apache.ldap.common.message.spi.Provider ;
-import org.apache.ldap.common.message.spi.DecoderSpi ;
+import org.apache.ldap.common.message.spi.ProviderDecoder ;
 import org.apache.ldap.common.message.spi.ProviderException ;
 
 import org.apache.ldap.common.berlib.snacc.ldap_v3.LDAPMessage ;
+import org.apache.commons.codec.DecoderException;
+import org.apache.commons.codec.stateful.DecoderCallback;
+import org.apache.commons.codec.stateful.DecoderMonitor;
 
 import com.ibm.asn1.BERDecoder ;
 import com.ibm.asn1.ASN1Exception ;
@@ -235,7 +238,7 @@
  * @version $Revision: 1.1 $
  */
 public class SnaccDecoder
-    implements DecoderSpi
+    implements ProviderDecoder
 {
     /** Provider owning this decoder SPI implementation */
 	private final Provider m_provider ;
@@ -247,7 +250,7 @@
 
 
     /**
-     * Creates an instance of a Snacc4J DecoderSpi implementation.
+     * Creates an instance of a Snacc4J Decoder implementation.
      *
      * @param a_provider the owning provider.
      */
@@ -263,7 +266,7 @@
 
 
     /**
-     * Gets the Provider that this DecoderSpi implementation is part of.
+     * Gets the Provider that this Decoder implementation is part of.
      *
      * @return the owning provider.
      */
@@ -274,7 +277,7 @@
 
 
     // ------------------------------------------------------------------------
-    // DecoderSpi Interface Method Implementations
+    // Decoder Interface Method Implementations
     // ------------------------------------------------------------------------
 
 
@@ -333,5 +336,23 @@
 		}
 
         return l_message ;
+    }
+
+
+    public void decode( Object encoded ) throws DecoderException
+    {
+        throw new UnsupportedOperationException( "not supported by provider " );
+    }
+
+
+    public void setCallback( DecoderCallback cb )
+    {
+        // @todo does nothing - should log with warning though
+    }
+
+
+    public void setDecoderMonitor( DecoderMonitor monitor )
+    {
+        // @todo does nothing - should log with warning though
     }
 }

Modified: incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SnaccProvider.java
==============================================================================
--- incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SnaccProvider.java	(original)
+++ incubator/directory/ldap/trunk/snacc-provider/src/java/org/apache/ldap/common/berlib/snacc/SnaccProvider.java	Tue Aug 31 22:36:13 2004
@@ -202,7 +202,7 @@
  *   limitations under the License.
  *
  */
-
+
 /*
  * $Id: SnaccProvider.java,v 1.5 2003/08/04 04:27:15 akarasulu Exp $
  *
@@ -217,7 +217,7 @@
 
 import org.apache.ldap.common.message.spi.Provider ;
 import org.apache.ldap.common.message.spi.EncoderSpi ;
-import org.apache.ldap.common.message.spi.DecoderSpi ;
+import org.apache.ldap.common.message.spi.ProviderDecoder ;
 import org.apache.ldap.common.message.spi.TransformerSpi ;
 import org.apache.ldap.common.message.spi.ProviderException ;
 
@@ -260,8 +260,8 @@
 
     /** This provider's EncoderSpi implementation */
     private final EncoderSpi m_encoder ;
-    /** This provider's DecoderSpi implementation */
-    private final DecoderSpi m_decoder ;
+    /** This provider's Decoder implementation */
+    private final ProviderDecoder decoder ;
     /** This provider's TransformerSpi implementation */
     private final TransformerSpi m_transformer ;
 
@@ -280,7 +280,7 @@
     {
         super( "Snacc4J BER Library Provider", "IBM Alphaworks" ) ;
 		m_encoder = new SnaccEncoder( this ) ;
-		m_decoder = new SnaccDecoder( this ) ;
+		decoder = new SnaccDecoder( this ) ;
 		m_transformer = new SnaccTransformer( this ) ;
 
         if( s_singleton != null )
@@ -311,14 +311,14 @@
 
 
     /**
-     * Gets the DecoderSpi implementation instance associated with this
+     * Gets the Decoder implementation instance associated with this
      * Provider.
      *
-     * @return an instance of the DecoderSpi implementation.
+     * @return an instance of the Decoder implementation.
      */
-    public DecoderSpi getDecoder()
+    public ProviderDecoder getDecoder()
     {
-        return m_decoder ;
+        return decoder ;
     }
 
 

Mime
View raw message