directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r992822 - /directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/
Date Sun, 05 Sep 2010 16:59:50 GMT
Author: elecharny
Date: Sun Sep  5 16:59:50 2010
New Revision: 992822

URL: http://svn.apache.org/viewvc?rev=992822&view=rev
Log:
Finished the asn1 classes review :
o removed useless classes

Removed:
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/CallbackHistory.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/DecoderFactory.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/DecoderMonitor.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/DecoderMonitorAdapter.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/DecoderStack.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/EncoderFactory.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/EncoderMonitor.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/EncoderMonitorAdapter.java
Modified:
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/AbstractStatefulDecoder.java
    directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/EncoderCallback.java

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/AbstractStatefulDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/AbstractStatefulDecoder.java?rev=992822&r1=992821&r2=992822&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/AbstractStatefulDecoder.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/AbstractStatefulDecoder.java
Sun Sep  5 16:59:50 2010
@@ -21,7 +21,7 @@ package org.apache.directory.shared.asn1
 
 
 /**
- * Convenience class to not have to reimplement the two setter methods everytime
+ * Convenience class to not have to re-implement the two setter methods every time
  * one starts a new decoder.
  * 
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
@@ -31,13 +31,6 @@ public abstract class AbstractStatefulDe
     /** this decoder's callback */
     private DecoderCallback cb = null;
 
-    /** this decoder's monitor */
-    private DecoderMonitor monitor = null;
-
-
-    // ------------------------------------------------------------------------
-    // constructors
-    // ------------------------------------------------------------------------
 
     /**
      * Creates a stateful decoder where the callback and monitor must be set.
@@ -59,44 +52,11 @@ public abstract class AbstractStatefulDe
 
 
     /**
-     * Creates a stateful decoder with a monitor but no callback.
-     * 
-     * @param monitor the monitor to use for this decoder
-     */
-    public AbstractStatefulDecoder( DecoderMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
-    /**
-     * Creates a stateful decoder.
-     * 
-     * @param cb the callback to use for this decoder
-     * @param monitor the monitor to use for this decoder
-     */
-    public AbstractStatefulDecoder( DecoderCallback cb, DecoderMonitor monitor )
-    {
-        this.monitor = monitor;
-        setCallback( cb );
-    }
-
-
-    // ------------------------------------------------------------------------
-    // StatefulDecoder methods
-    // ------------------------------------------------------------------------
-    /**
      * {@inheritDoc}
      */
     public void setCallback( DecoderCallback cb )
     {
-        DecoderCallback old = this.cb;
         this.cb = cb;
-
-        if ( this.monitor != null )
-        {
-            this.monitor.callbackSet( this, old, cb );
-        }
     }
 
 
@@ -110,24 +70,10 @@ public abstract class AbstractStatefulDe
 
 
     /**
-     * {@inheritDoc}
-     */
-    public void setDecoderMonitor( DecoderMonitor monitor )
-    {
-        this.monitor = monitor;
-    }
-
-
-    // ------------------------------------------------------------------------
-    // protected methods
-    // ------------------------------------------------------------------------
-
-    /**
      * Notifies via the callback if one has been set that this decoder has
      * decoded a unit of encoded data.
      * 
-     * @param decoded
-     *            the decoded byproduct.
+     * @param decoded the decoded byproduct.
      */
     protected void decodeOccurred( Object decoded )
     {
@@ -136,15 +82,4 @@ public abstract class AbstractStatefulDe
             cb.decodeOccurred( this, decoded );
         }
     }
-
-
-    /**
-     * Gets the decoder's monitor.
-     * 
-     * @return the monitor for this StatefulDecoder
-     */
-    protected DecoderMonitor getDecoderMonitor()
-    {
-        return monitor;
-    }
 }

Modified: directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/EncoderCallback.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/EncoderCallback.java?rev=992822&r1=992821&r2=992822&view=diff
==============================================================================
--- directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/EncoderCallback.java
(original)
+++ directory/shared/trunk/asn1/src/main/java/org/apache/directory/shared/asn1/codec/stateful/EncoderCallback.java
Sun Sep  5 16:59:50 2010
@@ -21,7 +21,7 @@ package org.apache.directory.shared.asn1
 
 
 /**
- * Document me.
+ * Callback interface for stateful encoder callbacks.
  * 
  * @author <a href="mailto:dev@directory.apache.org"> Apache Directory Project</a>
  */
@@ -30,10 +30,8 @@ public interface EncoderCallback
     /**
      * Callback to deliver a fully encoded object.
      * 
-     * @param encoder
-     *            the stateful encoder driving the callback
-     * @param encoded
-     *            the object that was encoded
+     * @param encoder the stateful encoder driving the callback
+     * @param encoded the object that was encoded
      */
     void encodeOccurred( StatefulEncoder encoder, Object encoded );
 }



Mime
View raw message