directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r910150 [7/11] - in /directory: apacheds/trunk/ apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/co...
Date Mon, 15 Feb 2010 01:37:47 GMT
Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulDisconnect/GracefulDisconnect.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulDisconnect/GracefulDisconnect.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulDisconnect/GracefulDisconnect.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulDisconnect/GracefulDisconnect.java Mon Feb 15 01:37:34 2010
@@ -151,11 +151,10 @@
     /**
      * Encodes the gracefulDisconnect extended operation.
      * 
-     * @param buffer The encoded sink
      * @return A ByteBuffer that contains the encoded PDU
      * @throws EncoderException If anything goes wrong.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    public ByteBuffer encode() throws EncoderException
     {
         // Allocate the bytes buffer.
         ByteBuffer bb = ByteBuffer.allocate( computeLength() );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulShutdown/GracefulShutdown.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulShutdown/GracefulShutdown.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulShutdown/GracefulShutdown.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/gracefulShutdown/GracefulShutdown.java Mon Feb 15 01:37:34 2010
@@ -22,6 +22,7 @@
 
 import java.nio.ByteBuffer;
 
+import org.apache.directory.shared.asn1.Asn1Object;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
 import org.apache.directory.shared.asn1.ber.tlv.Value;
@@ -88,11 +89,10 @@
     /**
      * Encodes the gracefulShutdown extended operation.
      * 
-     * @param buffer The encoded sink
      * @return A ByteBuffer that contains the encoded PDU
      * @throws EncoderException If anything goes wrong.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    public ByteBuffer encode() throws EncoderException
     {
         // Allocate the bytes buffer.
         ByteBuffer bb = ByteBuffer.allocate( computeLength() );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/extended/operations/storedProcedure/StoredProcedure.java Mon Feb 15 01:37:34 2010
@@ -260,10 +260,9 @@
     /**
      * Encode the StoredProcedure message to a PDU. 
      * 
-     * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    public ByteBuffer encode() throws EncoderException
     {
         // Allocate the bytes buffer.
         ByteBuffer bb = ByteBuffer.allocate( computeLength() );

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/intermediate/IntermediateResponseCodec.java Mon Feb 15 01:37:34 2010
@@ -28,7 +28,10 @@
 import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.util.StringTools;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -42,8 +45,11 @@
  */
 public class IntermediateResponseCodec extends LdapResponseCodec
 {
-    // ~ Instance fields
-    // ----------------------------------------------------------------------------
+    /** The logger */
+    private static Logger LOGGER = LoggerFactory.getLogger( IntermediateResponseCodec.class );
+
+    /** Speedup for logs */
+    private static final boolean IS_DEBUG = LOGGER.isDebugEnabled();
 
     /** The name */
     private OID responseName;
@@ -78,9 +84,18 @@
      * 
      * @return Returns the type.
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
+    {
+        return MessageTypeEnum.INTERMEDIATE_RESPONSE;
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String getMessageTypeName()
     {
-        return LdapConstants.INTERMEDIATE_RESPONSE;
+        return "INTERMEDIATE_RESPONSE";
     }
 
 
@@ -145,7 +160,7 @@
      * 
      * @return The IntermediateResponse length
      */
-    public int computeLength()
+    protected int computeLengthProtocolOp()
     {
         intermediateResponseLength = 0;
 
@@ -161,7 +176,14 @@
                     + responseValue.length;
         }
 
-        return 1 + TLV.getNbBytes( intermediateResponseLength ) + intermediateResponseLength;
+        int length = 1 + TLV.getNbBytes( intermediateResponseLength ) + intermediateResponseLength;
+
+        if ( IS_DEBUG )
+        {
+            LOGGER.debug( "Intermediate response length : {}", Integer.valueOf( length ) );
+        }
+
+        return length;
     }
 
 
@@ -175,13 +197,8 @@
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
     {
-        if ( buffer == null )
-        {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
-        }
-
         try
         {
             // The IntermediateResponse Tag
@@ -215,13 +232,13 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            String msg = "The PDU buffer size is too small !";
+            LOGGER.error( msg );
+            throw new EncoderException( msg );
         }
-
-        return buffer;
     }
 
-
+    
     /**
      * Get a String representation of an IntermediateResponse
      * 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyRequestCodec.java Mon Feb 15 01:37:34 2010
@@ -32,6 +32,7 @@
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
@@ -128,9 +129,18 @@
      * 
      * @return Returns the type.
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
-        return LdapConstants.MODIFY_REQUEST;
+        return MessageTypeEnum.MODIFY_REQUEST;
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String getMessageTypeName()
+    {
+        return "MODIFY_REQUEST";
     }
 
 
@@ -332,7 +342,7 @@
      *                          +--> ...
      *                          +--> 0x04 L8-2-n attributeValue
      */
-    public int computeLength()
+    protected int computeLengthProtocolOp()
     {
         // Initialized with object
         modifyRequestLength = 1 + TLV.getNbBytes( LdapDN.getNbBytes( object ) ) + LdapDN.getNbBytes( object );
@@ -394,6 +404,7 @@
      * Encode the ModifyRequest message to a PDU. 
      * 
      * ModifyRequest : 
+     * <pre>
      * 0x66 LL
      *   0x04 LL object
      *   0x30 LL modifiations
@@ -414,18 +425,13 @@
      *           0x04 LL attributeValue
      *           ... 
      *           0x04 LL attributeValue
-     * 
+     * </pre>
      * 
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
     {
-        if ( buffer == null )
-        {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
-        }
-
         try
         {
             // The AddRequest Tag
@@ -496,8 +502,6 @@
         {
             throw new EncoderException( "The PDU buffer size is too small !" );
         }
-
-        return buffer;
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modify/ModifyResponseCodec.java Mon Feb 15 01:37:34 2010
@@ -27,6 +27,7 @@
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**
@@ -56,9 +57,18 @@
      * 
      * @return Returns the type.
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
-        return LdapConstants.MODIFY_RESPONSE;
+        return MessageTypeEnum.MODIFY_RESPONSE;
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String getMessageTypeName()
+    {
+        return "MODIFY_RESPONSE";
     }
 
 
@@ -66,16 +76,18 @@
      * Compute the ModifyResponse length 
      * 
      * ModifyResponse : 
+     * <pre>
      * 0x67 L1 
      *   | 
      *   +--> LdapResult 
      *   
      * L1 = Length(LdapResult) 
      * Length(ModifyResponse) = Length(0x67) + Length(L1) + L1
+     * </pre>
      */
-    public int computeLength()
+    protected int computeLengthProtocolOp()
     {
-        int ldapResponseLength = super.computeLength();
+        int ldapResponseLength = super.computeLdapResultLength();
 
         return 1 + TLV.getNbBytes( ldapResponseLength ) + ldapResponseLength;
     }
@@ -87,13 +99,8 @@
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
     {
-        if ( buffer == null )
-        {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
-        }
-
         try
         {
             // The tag
@@ -106,7 +113,7 @@
         }
 
         // The ldapResult
-        return super.encode( buffer );
+        super.encode( buffer );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNRequestCodec.java Mon Feb 15 01:37:34 2010
@@ -28,6 +28,7 @@
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.RDN;
 import org.apache.directory.shared.ldap.util.StringTools;
@@ -85,9 +86,18 @@
      * 
      * @return Returns the type.
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
-        return LdapConstants.MODIFYDN_REQUEST;
+        return MessageTypeEnum.MODIFYDN_REQUEST;
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String getMessageTypeName()
+    {
+        return "MODIFYDN_REQUEST";
     }
 
 
@@ -183,7 +193,7 @@
      * Compute the ModifyDNRequest length
      * 
      * ModifyDNRequest :
-     * 
+     * <pre>
      * 0x6C L1
      *  |
      *  +--> 0x04 L2 entry
@@ -197,10 +207,11 @@
      * L1 = L2 + L3 + 3 [+ L4] 
      * 
      * Length(ModifyDNRequest) = Length(0x6C) + Length(L1) + L1
+     * </pre>
      * 
      * @return The PDU's length of a ModifyDN Request
      */
-    public int computeLength()
+    protected int computeLengthProtocolOp()
     {
         int newRdnlength = StringTools.getBytesUtf8( newRDN.toString() ).length;
         modifyDNRequestLength = 1 + TLV.getNbBytes( LdapDN.getNbBytes( entry ) ) + LdapDN.getNbBytes( entry ) + 1
@@ -220,23 +231,18 @@
      * Encode the ModifyDNRequest message to a PDU. 
      * 
      * ModifyDNRequest :
-     * 
+     * <pre>
      * 0x6C LL
      *   0x04 LL entry
      *   0x04 LL newRDN
      *   0x01 0x01 deleteOldRDN
      *   [0x80 LL newSuperior]
-     * 
+     * </pre>
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
     {
-        if ( buffer == null )
-        {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
-        }
-
         try
         {
             // The ModifyDNRequest Tag
@@ -273,8 +279,6 @@
         {
             throw new EncoderException( "The PDU buffer size is too small !" );
         }
-
-        return buffer;
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/modifyDn/ModifyDNResponseCodec.java Mon Feb 15 01:37:34 2010
@@ -27,6 +27,7 @@
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**
@@ -56,9 +57,18 @@
      * 
      * @return Returns the type.
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
-        return LdapConstants.MODIFYDN_RESPONSE;
+        return MessageTypeEnum.MODIFYDN_RESPONSE;
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String getMessageTypeName()
+    {
+        return "MODIFYDN_RESPONSE";
     }
 
 
@@ -66,18 +76,20 @@
      * Compute the ModifyDNResponse length 
      * 
      * ModifyDNResponse : 
+     * <pre>
      * 0x6D L1 
      *   | 
      *   +--> LdapResult 
      *   
      * L1 = Length(LdapResult) 
      * Length(ModifyDNResponse) = Length(0x6D) + Length(L1) + L1
+     * </pre>
      */
-    public int computeLength()
+    protected int computeLengthProtocolOp()
     {
-        int ldapResponseLength = super.computeLength();
+        int ldapResultLength = super.computeLdapResultLength();
 
-        return 1 + TLV.getNbBytes( ldapResponseLength ) + ldapResponseLength;
+        return 1 + TLV.getNbBytes( ldapResultLength ) + ldapResultLength;
     }
 
 
@@ -87,13 +99,8 @@
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
     {
-        if ( buffer == null )
-        {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
-        }
-
         try
         {
             // The tag
@@ -106,7 +113,7 @@
         }
 
         // The ldapResult
-        return super.encode( buffer );
+        super.encode( buffer );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchRequestCodec.java Mon Feb 15 01:37:34 2010
@@ -36,6 +36,7 @@
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.apache.directory.shared.ldap.codec.LdapMessageContainer;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
 import org.apache.directory.shared.ldap.filter.SearchScope;
@@ -122,9 +123,18 @@
      * 
      * @return Returns the type.
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
-        return LdapConstants.SEARCH_REQUEST;
+        return MessageTypeEnum.SEARCH_REQUEST;
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String getMessageTypeName()
+    {
+        return "SEARCH_REQUEST";
     }
 
 
@@ -441,7 +451,7 @@
      * Compute the SearchRequest length
      * 
      * SearchRequest :
-     * 
+     * <pre>
      * 0x63 L1
      *  |
      *  +--> 0x04 L2 baseObject
@@ -459,8 +469,9 @@
      *        +--> 0x04 L4-i Attribute description 
      *        +--> ... 
      *        +--> 0x04 L4-n Attribute description 
+     *        </pre>
      */
-    public int computeLength()
+    protected int computeLengthProtocolOp()
     {
         searchRequestLength = 0;
 
@@ -524,7 +535,7 @@
      * Encode the SearchRequest message to a PDU.
      * 
      * SearchRequest :
-     * 
+     * <pre>
      * 0x63 LL
      *   0x04 LL baseObject
      *   0x0A 01 scope
@@ -537,17 +548,12 @@
      *     0x04 LL attributeDescription
      *     ... 
      *     0x04 LL attributeDescription
-     * 
+     * </pre>
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
     {
-        if ( buffer == null )
-        {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
-        }
-
         try
         {
             // The SearchRequest Tag
@@ -592,8 +598,6 @@
         {
             throw new EncoderException( "The PDU buffer size is too small !" );
         }
-
-        return buffer;
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultDoneCodec.java Mon Feb 15 01:37:34 2010
@@ -27,6 +27,7 @@
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**
@@ -58,9 +59,18 @@
      * 
      * @return Returns the type.
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
-        return LdapConstants.SEARCH_RESULT_DONE;
+        return MessageTypeEnum.SEARCH_RESULT_DONE;
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String getMessageTypeName()
+    {
+        return "SEARCH_RESULT_DONE";
     }
 
 
@@ -68,16 +78,18 @@
      * Compute the SearchResultDone length 
      * 
      * SearchResultDone : 
+     * <pre>
      * 0x65 L1 
      *   | 
      *   +--> LdapResult 
      *   
      * L1 = Length(LdapResult) 
      * Length(SearchResultDone) = Length(0x65) + Length(L1) + L1
+     * </pre>
      */
-    public int computeLength()
+    protected int computeLengthProtocolOp()
     {
-        int ldapResponseLength = super.computeLength();
+        int ldapResponseLength = computeLdapResultLength();
 
         return 1 + TLV.getNbBytes( ldapResponseLength ) + ldapResponseLength;
     }
@@ -89,13 +101,8 @@
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
     {
-        if ( buffer == null )
-        {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
-        }
-
         try
         {
             // The tag
@@ -108,7 +115,7 @@
         }
 
         // The ldapResult
-        return super.encode( buffer );
+        super.encode( buffer );
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultEntryCodec.java Mon Feb 15 01:37:34 2010
@@ -34,6 +34,7 @@
 import org.apache.directory.shared.asn1.util.Asn1StringUtils;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientAttribute;
@@ -110,9 +111,18 @@
      * 
      * @return Returns the type.
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
-        return LdapConstants.SEARCH_RESULT_ENTRY;
+        return MessageTypeEnum.SEARCH_RESULT_ENTRY;
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String getMessageTypeName()
+    {
+        return "SEARCH_RESULT_ENTRY";
     }
 
 
@@ -203,7 +213,7 @@
      * Compute the SearchResultEntry length
      * 
      * SearchResultEntry :
-     * 
+     * <pre>
      * 0x64 L1
      *  |
      *  +--> 0x04 L2 objectName
@@ -237,9 +247,9 @@
      *                    +--> 0x04 L7-m-1 value
      *                    +--> ...
      *                    +--> 0x04 L7-m-n value
-     * 
+     * </pre>
      */
-    public int computeLength()
+    protected int computeLengthProtocolOp()
     {
         objectNameBytes = StringTools.getBytesUtf8( entry.getDn().getName() );
 
@@ -314,7 +324,7 @@
      * Encode the SearchResultEntry message to a PDU.
      * 
      * SearchResultEntry :
-     * 
+     * <pre>
      * 0x64 LL
      *   0x04 LL objectName
      *   0x30 LL attributes
@@ -331,17 +341,12 @@
      *         0x04 LL attributeValue
      *         ... 
      *         0x04 LL attributeValue 
-     * 
+     * </pre>
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
     {
-        if ( buffer == null )
-        {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
-        }
-
         try
         {
             // The SearchResultEntry Tag
@@ -403,8 +408,6 @@
         {
             throw new EncoderException( "The PDU buffer size is too small !" );
         }
-
-        return buffer;
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/search/SearchResultReferenceCodec.java Mon Feb 15 01:37:34 2010
@@ -30,6 +30,7 @@
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.util.LdapURL;
 
 
@@ -73,9 +74,18 @@
      * 
      * @return Returns the type.
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
-        return LdapConstants.SEARCH_RESULT_REFERENCE;
+        return MessageTypeEnum.SEARCH_RESULT_REFERENCE;
+    }
+
+    
+    /**
+     * {@inheritDoc}
+     */
+    public String getMessageTypeName()
+    {
+        return "SEARCH_RESULT_REFERENCE";
     }
 
 
@@ -105,7 +115,7 @@
      * Compute the SearchResultReference length
      * 
      * SearchResultReference :
-     * 
+     * <pre>
      * 0x73 L1
      *  |
      *  +--> 0x04 L2 reference
@@ -118,8 +128,9 @@
      * L1 = n*Length(0x04) + sum(Length(Li)) + sum(Length(reference[i]))
      * 
      * Length(SearchResultReference) = Length(0x73 + Length(L1) + L1
+     * </pre>
      */
-    public int computeLength()
+    protected int computeLengthProtocolOp()
     {
         searchResultReferenceLength = 0;
 
@@ -138,21 +149,16 @@
      * Encode the SearchResultReference message to a PDU.
      * 
      * SearchResultReference :
-     * 
+     * <pre>
      * 0x73 LL
      *   0x04 LL reference
      *   [0x04 LL reference]*
-     * 
+     * </pre>
      * @param buffer The buffer where to put the PDU
      * @return The PDU.
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
     {
-        if ( buffer == null )
-        {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
-        }
-
         try
         {
             // The SearchResultReference Tag
@@ -170,8 +176,6 @@
         {
             throw new EncoderException( "The PDU buffer size is too small !" );
         }
-
-        return buffer;
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/unbind/UnBindRequestCodec.java Mon Feb 15 01:37:34 2010
@@ -26,6 +26,9 @@
 import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -41,8 +44,8 @@
  */
 public class UnBindRequestCodec extends LdapMessageCodec
 {
-    // ~ Instance fields
-    // ----------------------------------------------------------------------------
+    /** The logger */
+    private static Logger LOGGER = LoggerFactory.getLogger( UnBindRequestCodec.class );
 
     // ~ Constructors
     // -------------------------------------------------------------------------------
@@ -64,9 +67,9 @@
      * 
      * @return Returns the type.
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
-        return LdapConstants.UNBIND_REQUEST;
+        return MessageTypeEnum.UNBIND_REQUEST;
     }
 
 
@@ -76,25 +79,17 @@
      * UnBindRequest : 
      * 0x42 00
      */
-    public int computeLength()
+    protected int computeLengthProtocolOp()
     {
         return 2; // Always 2
     }
 
 
     /**
-     * Encode the UnbindRequest message to a PDU.
-     * 
-     * @param buffer The buffer where to put the PDU
-     * @return The PDU.
+     * Encode the Unbind protocolOp part
      */
-    public ByteBuffer encode( ByteBuffer buffer ) throws EncoderException
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
     {
-        if ( buffer == null )
-        {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
-        }
-
         try
         {
             // The tag
@@ -105,10 +100,19 @@
         }
         catch ( BufferOverflowException boe )
         {
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            String msg = "The PDU buffer size is too small !";
+            LOGGER.error( msg );
+            throw new EncoderException( msg );
         }
+    }
+
 
-        return buffer;
+    /**
+     * {@inheritDoc}
+     */
+    public String getMessageTypeName()
+    {
+        return "UNBIND_REQUEST";
     }
 
 
@@ -119,11 +123,6 @@
      */
     public String toString()
     {
-
-        StringBuffer sb = new StringBuffer();
-
-        sb.append( "    UnBind Request\n" );
-
-        return sb.toString();
+        return super.toString( "    UnBind Request" );
     }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractAbandonableRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractAbandonableRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractAbandonableRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AbstractAbandonableRequest.java Mon Feb 15 01:37:34 2010
@@ -23,6 +23,7 @@
 import java.util.Observable;
 import java.util.Observer;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalAbandonableRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalAbstractRequest;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/AddRequestImpl.java Mon Feb 15 01:37:34 2010
@@ -21,6 +21,7 @@
 
 
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
 import org.apache.directory.shared.ldap.message.internal.InternalAddRequest;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/BindRequestImpl.java Mon Feb 15 01:37:34 2010
@@ -22,6 +22,7 @@
 
 import java.util.Arrays;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalBindRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalBindResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/CompareRequestImpl.java Mon Feb 15 01:37:34 2010
@@ -20,6 +20,7 @@
 package org.apache.directory.shared.ldap.message;
 
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientBinaryValue;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/DeleteRequestImpl.java Mon Feb 15 01:37:34 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalDeleteRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalDeleteResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ExtendedRequestImpl.java Mon Feb 15 01:37:34 2010
@@ -25,6 +25,7 @@
 import javax.naming.NamingException;
 import javax.naming.ldap.ExtendedResponse;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalAbstractRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalExtendedRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ManyReplyRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ManyReplyRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ManyReplyRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ManyReplyRequest.java Mon Feb 15 01:37:34 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest;
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyDnRequestImpl.java Mon Feb 15 01:37:34 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyDnRequest;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyDnResponse;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ModifyRequestImpl.java Mon Feb 15 01:37:34 2010
@@ -26,6 +26,7 @@
 import java.util.Iterator;
 import java.util.List;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.client.ClientModification;
 import org.apache.directory.shared.ldap.message.internal.InternalModifyRequest;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/ResultCodeEnum.java Mon Feb 15 01:37:34 2010
@@ -20,9 +20,9 @@
 package org.apache.directory.shared.ldap.message;
 
 
-import java.util.Set;
-import java.util.HashSet;
 import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
 
 import javax.naming.AuthenticationException;
 import javax.naming.AuthenticationNotSupportedException;
@@ -46,6 +46,7 @@
 import javax.naming.directory.NoSuchAttributeException;
 import javax.naming.directory.SchemaViolationException;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.exception.LdapException;
 
 
@@ -2096,19 +2097,19 @@
                 candidates = intersection( set, DELETE_CODES );
                 break;
                 
-            case EXTENDED_REQ :
+            case EXTENDED_REQUEST :
                 candidates = intersection( set, EXTENDED_CODES );
                 break;
                 
-            case EXTENDED_RESP :
+            case EXTENDED_RESPONSE :
                 candidates = intersection( set, EXTENDED_CODES );
                 break;
                 
-            case MOD_DN_REQUEST :
+            case MODIFYDN_REQUEST :
                 candidates = intersection( set, MODIFYDN_CODES );
                 break;
                 
-            case MOD_DN_RESPONSE :
+            case MODIFYDN_RESPONSE :
                 candidates = intersection( set, MODIFYDN_CODES );
                 break;
                 
@@ -2124,15 +2125,15 @@
                 candidates = intersection( set, SEARCH_CODES );
                 break;
                 
-            case SEARCH_RES_DONE :
+            case SEARCH_RESULT_DONE :
                 candidates = intersection( set, SEARCH_CODES );
                 break;
                 
-            case SEARCH_RES_ENTRY :
+            case SEARCH_RESULT_ENTRY :
                 candidates = intersection( set, SEARCH_CODES );
                 break;
                 
-            case SEARCH_RES_REF :
+            case SEARCH_RESULT_REFERENCE :
                 candidates = intersection( set, SEARCH_CODES );
                 break;
                 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SearchRequestImpl.java Mon Feb 15 01:37:34 2010
@@ -26,6 +26,7 @@
 import java.util.List;
 
 import org.apache.directory.shared.ldap.codec.LdapConstants;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.filter.BranchNormalizedVisitor;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SingleReplyRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SingleReplyRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SingleReplyRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/SingleReplyRequest.java Mon Feb 15 01:37:34 2010
@@ -19,6 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponseRequest;
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CancelRequest.java Mon Feb 15 01:37:34 2010
@@ -84,7 +84,7 @@
         Cancel cancel = new Cancel();
         cancel.setCancelId( this.cancelId );
 
-        payload = cancel.encode( null ).array();
+        payload = cancel.encode().array();
     }
     
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/CertGenerationRequest.java Mon Feb 15 01:37:34 2010
@@ -77,7 +77,7 @@
 
     private void encodePayload() throws EncoderException
     {
-        payload = certGenObj.encode( null ).array();
+        payload = certGenObj.encode().array();
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulDisconnect.java Mon Feb 15 01:37:34 2010
@@ -35,7 +35,6 @@
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.message.internal.InternalReferral;
 import org.apache.directory.shared.ldap.util.LdapURL;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -153,7 +152,7 @@
 
         try
         {
-            super.value = codec.encode( null ).array();
+            super.value = codec.encode().array();
         }
         catch ( EncoderException e )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/GracefulShutdownRequest.java Mon Feb 15 01:37:34 2010
@@ -29,7 +29,6 @@
 import org.apache.directory.shared.ldap.codec.extended.operations.gracefulShutdown.GracefulShutdownDecoder;
 import org.apache.directory.shared.ldap.message.ExtendedRequestImpl;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -85,7 +84,7 @@
         GracefulShutdown gs = new GracefulShutdown();
         gs.setDelay( this.delay );
         gs.setTimeOffline( this.timeOffline );
-        payload = gs.encode( null ).array();
+        payload = gs.encode().array();
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/extended/StoredProcedureRequest.java Mon Feb 15 01:37:34 2010
@@ -33,7 +33,6 @@
 import org.apache.directory.shared.ldap.message.ExtendedRequestImpl;
 import org.apache.directory.shared.ldap.message.internal.InternalResultResponse;
 import org.apache.directory.shared.ldap.util.StringTools;
-
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -73,7 +72,7 @@
 
     private void encodePayload() throws EncoderException
     {
-        payload = procedure.encode( null ).array();
+        payload = procedure.encode().array();
     }
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbandonRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbandonRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbandonRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbandonRequest.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbandonableRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbandonableRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbandonableRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbandonableRequest.java Mon Feb 15 01:37:34 2010
@@ -51,5 +51,4 @@
      *            to be notified if this request gets abandoned.
      */
     void addAbandonListener( AbandonListener listener );
-
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractMessage.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractMessage.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractMessage.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractMessage.java Mon Feb 15 01:37:34 2010
@@ -24,9 +24,9 @@
 import java.util.Iterator;
 import java.util.Map;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.controls.CodecControl;
 import org.apache.directory.shared.ldap.message.MessageException;
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractRequest.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResponse.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResultResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResultResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResultResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAbstractResultResponse.java Mon Feb 15 01:37:34 2010
@@ -19,8 +19,8 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.LdapResultImpl;
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 
 
 /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAddRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAddRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAddRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAddRequest.java Mon Feb 15 01:37:34 2010
@@ -21,8 +21,8 @@
 package org.apache.directory.shared.ldap.message.internal;
 
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.Entry;
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.SingleReplyRequest;
 import org.apache.directory.shared.ldap.name.LdapDN;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAddResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAddResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAddResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalAddResponse.java Mon Feb 15 01:37:34 2010
@@ -20,7 +20,7 @@
 
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalBindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalBindRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalBindRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalBindRequest.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.SingleReplyRequest;
 import org.apache.directory.shared.ldap.name.LdapDN;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalBindResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalBindResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalBindResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalBindResponse.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalCompareRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalCompareRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalCompareRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalCompareRequest.java Mon Feb 15 01:37:34 2010
@@ -19,8 +19,8 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.SingleReplyRequest;
 import org.apache.directory.shared.ldap.name.LdapDN;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalCompareResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalCompareResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalCompareResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalCompareResponse.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalDeleteRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalDeleteRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalDeleteRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalDeleteRequest.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.SingleReplyRequest;
 import org.apache.directory.shared.ldap.name.LdapDN;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalDeleteResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalDeleteResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalDeleteResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalDeleteResponse.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalExtendedRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalExtendedRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalExtendedRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalExtendedRequest.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.SingleReplyRequest;
 
 
@@ -59,7 +59,7 @@
 public interface InternalExtendedRequest extends SingleReplyRequest, javax.naming.ldap.ExtendedRequest
 {
     /** Extended request message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.EXTENDED_REQ;
+    MessageTypeEnum TYPE = MessageTypeEnum.EXTENDED_REQUEST;
 
     /** Extended response message type enumeration value */
     MessageTypeEnum RESP_TYPE = InternalExtendedResponse.TYPE;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalExtendedResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalExtendedResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalExtendedResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalExtendedResponse.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**
@@ -32,7 +32,7 @@
 public interface InternalExtendedResponse extends InternalResultResponse, javax.naming.ldap.ExtendedResponse
 {
     /** Extended response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.EXTENDED_RESP;
+    MessageTypeEnum TYPE = MessageTypeEnum.EXTENDED_RESPONSE;
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalIntermediateResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalIntermediateResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalIntermediateResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalIntermediateResponse.java Mon Feb 15 01:37:34 2010
@@ -20,8 +20,7 @@
 
 package org.apache.directory.shared.ldap.message.internal;
 
-
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**
@@ -34,7 +33,7 @@
 public interface InternalIntermediateResponse extends InternalResponse
 {
     /** Intermediate response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.INTERMEDIATE_RESP;
+    MessageTypeEnum TYPE = MessageTypeEnum.INTERMEDIATE_RESPONSE;
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalMessage.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalMessage.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalMessage.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalMessage.java Mon Feb 15 01:37:34 2010
@@ -22,9 +22,9 @@
 
 import java.util.Map;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.controls.CodecControl;
 import org.apache.directory.shared.ldap.message.MessageException;
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.control.Control;
 
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyDnRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyDnRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyDnRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyDnRequest.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.SingleReplyRequest;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.RDN;
@@ -70,7 +70,7 @@
 public interface InternalModifyDnRequest extends SingleReplyRequest, InternalAbandonableRequest
 {
     /** Modify DN request message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.MOD_DN_REQUEST;
+    MessageTypeEnum TYPE = MessageTypeEnum.MODIFYDN_REQUEST;
 
     /** Modify DN response message type enumeration value */
     MessageTypeEnum RESP_TYPE = InternalModifyDnResponse.TYPE;

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyDnResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyDnResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyDnResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyDnResponse.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**
@@ -32,5 +32,5 @@
 public interface InternalModifyDnResponse extends InternalResultResponse
 {
     /** Modify DN response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.MOD_DN_RESPONSE;
+    MessageTypeEnum TYPE = MessageTypeEnum.MODIFYDN_RESPONSE;
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyRequest.java Mon Feb 15 01:37:34 2010
@@ -22,8 +22,8 @@
 
 import java.util.Collection;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.message.SingleReplyRequest;
 import org.apache.directory.shared.ldap.name.LdapDN;
 

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyResponse.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalModifyResponse.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchRequest.java Mon Feb 15 01:37:34 2010
@@ -22,11 +22,11 @@
 
 import java.util.List;
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.message.ManyReplyRequest;
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -48,7 +48,12 @@
      * @see #getResponseTypes()
      */
     MessageTypeEnum[] RESPONSE_TYPES =
-        { InternalSearchResponseDone.TYPE, InternalSearchResponseEntry.TYPE, InternalSearchResponseReference.TYPE, InternalExtendedResponse.TYPE };
+        { 
+        InternalSearchResponseDone.TYPE, 
+        InternalSearchResponseEntry.TYPE, 
+        InternalSearchResponseReference.TYPE, 
+        InternalExtendedResponse.TYPE 
+        };
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseDone.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseDone.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseDone.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseDone.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**
@@ -32,5 +32,5 @@
 public interface InternalSearchResponseDone extends InternalResultResponse
 {
     /** Search done response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.SEARCH_RES_DONE;
+    MessageTypeEnum TYPE = MessageTypeEnum.SEARCH_RESULT_DONE;
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseEntry.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseEntry.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseEntry.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseEntry.java Mon Feb 15 01:37:34 2010
@@ -21,8 +21,8 @@
 package org.apache.directory.shared.ldap.message.internal;
 
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.entry.Entry;
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
 
 
@@ -36,7 +36,7 @@
 public interface InternalSearchResponseEntry extends InternalResponse
 {
     /** Search entry response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.SEARCH_RES_ENTRY;
+    MessageTypeEnum TYPE = MessageTypeEnum.SEARCH_RESULT_ENTRY;
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseReference.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseReference.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseReference.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalSearchResponseReference.java Mon Feb 15 01:37:34 2010
@@ -20,7 +20,7 @@
 
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**
@@ -33,7 +33,7 @@
 public interface InternalSearchResponseReference extends InternalResponse
 {
     /** Search reference response message type enumeration value */
-    MessageTypeEnum TYPE = MessageTypeEnum.SEARCH_RES_REF;
+    MessageTypeEnum TYPE = MessageTypeEnum.SEARCH_RESULT_REFERENCE;
 
 
     /**

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalUnbindRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalUnbindRequest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalUnbindRequest.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/message/internal/InternalUnbindRequest.java Mon Feb 15 01:37:34 2010
@@ -19,7 +19,7 @@
  */
 package org.apache.directory.shared.ldap.message.internal;
 
-import org.apache.directory.shared.ldap.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 
 
 /**

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapControlTest.java Mon Feb 15 01:37:34 2010
@@ -99,44 +99,43 @@
         }
 
         // Check that everything is OK
-        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        AbandonRequestCodec abandonRequest = message.getAbandonRequest();
+        AbandonRequestCodec abandonRequest = ( ( LdapMessageContainer ) ldapMessageContainer ).getAbandonRequest();
 
-        assertEquals( 3, message.getMessageId() );
+        assertEquals( 3, abandonRequest.getMessageId() );
         assertEquals( 2, abandonRequest.getAbandonedMessageId() );
 
         // Check the Controls
-        List<Control> controls = message.getControls();
+        List<Control> controls = abandonRequest.getControls();
 
         assertEquals( 4, controls.size() );
 
-        Control control = message.getControls( 0 );
+        Control control = abandonRequest.getControls( 0 );
         assertEquals( "1.3.6.1.5.5.1", control.getOid() );
         assertEquals( "0x61 0x62 0x63 0x64 0x65 0x66 ", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
         assertTrue( control.isCritical() );
 
-        control = message.getControls( 1 );
+        control = abandonRequest.getControls( 1 );
         assertEquals( "1.3.6.1.5.5.2", control.getOid() );
         assertEquals( "0x67 0x68 0x69 0x6A 0x6B 0x6C ", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
         assertFalse( control.isCritical() );
 
-        control = message.getControls( 2 );
+        control = abandonRequest.getControls( 2 );
         assertEquals( "1.3.6.1.5.5.3", control.getOid() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
         assertTrue( control.isCritical() );
 
-        control = message.getControls( 3 );
+        control = abandonRequest.getControls( 3 );
         assertEquals( "1.3.6.1.5.5.4", control.getOid() );
         assertEquals( "", StringTools.dumpBytes( ( byte[] ) control.getValue() ) );
         assertFalse( control.isCritical() );
 
         // Check the length
-        assertEquals( 0x64, message.computeLength() );
+        assertEquals( 0x64, abandonRequest.computeLength() );
 
         // Check the encoding
         try
         {
-            ByteBuffer bb = message.encode( null );
+            ByteBuffer bb = abandonRequest.encode();
 
             String encodedPdu = StringTools.dumpBytes( bb.array() );
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapDecoderTest.java Mon Feb 15 01:37:34 2010
@@ -86,14 +86,13 @@
         }
 
         // Check the decoded PDU
-        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        BindRequestCodec br = message.getBindRequest();
+        BindRequestCodec bindRequest = ( ( LdapMessageContainer ) ldapMessageContainer ).getBindRequest();
 
-        assertEquals( 1, message.getMessageId() );
-        assertEquals( 3, br.getVersion() );
-        assertEquals( "uid=akarasulu,dc=example,dc=com", br.getName().toString() );
-        assertEquals( true, ( br.getAuthentication() instanceof SimpleAuthentication ) );
-        assertEquals( "password", StringTools.utf8ToString( ( ( SimpleAuthentication ) br.getAuthentication() )
+        assertEquals( 1, bindRequest.getMessageId() );
+        assertEquals( 3, bindRequest.getVersion() );
+        assertEquals( "uid=akarasulu,dc=example,dc=com", bindRequest.getName().toString() );
+        assertEquals( true, ( bindRequest.getAuthentication() instanceof SimpleAuthentication ) );
+        assertEquals( "password", StringTools.utf8ToString( ( ( SimpleAuthentication ) bindRequest.getAuthentication() )
             .getSimple() ) );
     }
 
@@ -136,13 +135,12 @@
         assertEquals( TLVStateEnum.VALUE_STATE_PENDING, ldapMessageContainer.getState() );
 
         // Check the decoded PDU
-        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        BindRequestCodec br = message.getBindRequest();
+        BindRequestCodec bindRequest = ( ( LdapMessageContainer ) ldapMessageContainer ).getBindRequest();
 
-        assertEquals( 1, message.getMessageId() );
-        assertEquals( 3, br.getVersion() );
-        assertEquals( null, br.getName() );
-        assertEquals( false, ( br.getAuthentication() instanceof SimpleAuthentication ) );
+        assertEquals( 1, bindRequest.getMessageId() );
+        assertEquals( 3, bindRequest.getVersion() );
+        assertEquals( null, bindRequest.getName() );
+        assertEquals( false, ( bindRequest.getAuthentication() instanceof SimpleAuthentication ) );
     }
 
 
@@ -209,14 +207,13 @@
         assertEquals( ldapMessageContainer.getState(), TLVStateEnum.PDU_DECODED );
 
         // Check the decoded PDU
-        LdapMessageCodec message = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage();
-        BindRequestCodec br = message.getBindRequest();
+        BindRequestCodec bindRequest = ( ( LdapMessageContainer ) ldapMessageContainer ).getBindRequest();
 
-        assertEquals( 1, message.getMessageId() );
-        assertEquals( 3, br.getVersion() );
-        assertEquals( "uid=akarasulu,dc=example,dc=com", br.getName().toString() );
-        assertEquals( true, ( br.getAuthentication() instanceof SimpleAuthentication ) );
-        assertEquals( "password", StringTools.utf8ToString( ( ( SimpleAuthentication ) br.getAuthentication() )
+        assertEquals( 1, bindRequest.getMessageId() );
+        assertEquals( 3, bindRequest.getVersion() );
+        assertEquals( "uid=akarasulu,dc=example,dc=com", bindRequest.getName().toString() );
+        assertEquals( true, ( bindRequest.getAuthentication() instanceof SimpleAuthentication ) );
+        assertEquals( "password", StringTools.utf8ToString( ( ( SimpleAuthentication ) bindRequest.getAuthentication() )
             .getSimple() ) );
     }
 

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/codec/LdapMessageTest.java Mon Feb 15 01:37:34 2010
@@ -314,7 +314,7 @@
 
         try
         {
-            ByteBuffer bb = message.encode( null );
+            ByteBuffer bb = message.encode();
 
             String encodedPdu = StringTools.dumpBytes( bb.array() );
 



Mime
View raw message