directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r910150 [4/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/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/engine/Dsmlv2Engine.java Mon Feb 15 01:37:34 2010
@@ -56,10 +56,10 @@
 import org.apache.directory.shared.dsmlv2.request.BatchRequest.OnError;
 import org.apache.directory.shared.dsmlv2.request.BatchRequest.Processing;
 import org.apache.directory.shared.dsmlv2.request.BatchRequest.ResponseOrder;
-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.LdapResponseCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.add.AddResponseCodec;
 import org.apache.directory.shared.ldap.codec.bind.BindRequestCodec;
 import org.apache.directory.shared.ldap.codec.bind.BindResponseCodec;
@@ -281,7 +281,7 @@
                 return batchResponse.toDsml();
             }
 
-            // Checking if we need to exit processing (if an error has ocurred if onError == Exit)
+            // Checking if we need to exit processing (if an error has occurred if onError == Exit)
             if ( exit )
             {
                 break;
@@ -319,15 +319,7 @@
     private void processRequest( LdapMessageCodec request ) throws EncoderException, IOException, DecoderException,
         NamingException
     {
-        LdapMessageCodec message = new LdapMessageCodec();
-
-        message.setProtocolOP( request );
-
-        message.setMessageId( request.getMessageId() );
-
-        ByteBuffer bb = null;
-
-        bb = message.encode( null );
+        ByteBuffer bb = request.encode();
 
         bb.flip();
 
@@ -335,116 +327,127 @@
 
         bb.clear();
         bb.position( bb.capacity() );
+        
         // Get the response
         LdapMessageCodec response = null;
 
         response = readResponse( bb );
 
-        if ( LdapConstants.ADD_RESPONSE == response.getMessageType() )
-        {
-            AddResponseCodec addResponse = response.getAddResponse();
-            copyMessageIdAndControls( response, addResponse );
-
-            AddResponseDsml addResponseDsml = new AddResponseDsml( addResponse );
-            batchResponse.addResponse( addResponseDsml );
-        }
-        else if ( LdapConstants.BIND_RESPONSE == response.getMessageType() )
-        {
-            BindResponseCodec bindResponse = response.getBindResponse();
-            copyMessageIdAndControls( response, bindResponse );
-
-            AuthResponseDsml authResponseDsml = new AuthResponseDsml( bindResponse );
-            batchResponse.addResponse( authResponseDsml );
-        }
-        else if ( LdapConstants.COMPARE_RESPONSE == response.getMessageType() )
+        switch ( response.getMessageType() )
         {
-            CompareResponseCodec compareResponse = response.getCompareResponse();
-            copyMessageIdAndControls( response, compareResponse );
-
-            CompareResponseDsml authResponseDsml = new CompareResponseDsml( compareResponse );
-            batchResponse.addResponse( authResponseDsml );
-        }
-        else if ( LdapConstants.DEL_RESPONSE == response.getMessageType() )
-        {
-            DelResponseCodec delResponse = response.getDelResponse();
-            copyMessageIdAndControls( response, delResponse );
-
-            DelResponseDsml delResponseDsml = new DelResponseDsml( delResponse );
-            batchResponse.addResponse( delResponseDsml );
-        }
-        else if ( LdapConstants.MODIFY_RESPONSE == response.getMessageType() )
-        {
-            ModifyResponseCodec modifyResponse = response.getModifyResponse();
-            copyMessageIdAndControls( response, modifyResponse );
-
-            ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml( modifyResponse );
-            batchResponse.addResponse( modifyResponseDsml );
-        }
-        else if ( LdapConstants.MODIFYDN_RESPONSE == response.getMessageType() )
-        {
-            ModifyDNResponseCodec modifyDNResponse = response.getModifyDNResponse();
-            copyMessageIdAndControls( response, modifyDNResponse );
+            case ADD_RESPONSE :
+                AddResponseCodec addResponse = (AddResponseCodec)response;
+                copyMessageIdAndControls( response, addResponse );
+    
+                AddResponseDsml addResponseDsml = new AddResponseDsml( addResponse );
+                batchResponse.addResponse( addResponseDsml );
+                break;
+                
+            case BIND_RESPONSE :
+                BindResponseCodec bindResponse = (BindResponseCodec)response;
+                copyMessageIdAndControls( response, bindResponse );
+    
+                AuthResponseDsml authResponseDsml = new AuthResponseDsml( bindResponse );
+                batchResponse.addResponse( authResponseDsml );
+                break;
+                
+            case COMPARE_RESPONSE :
+                CompareResponseCodec compareResponse = (CompareResponseCodec)response;
+                copyMessageIdAndControls( response, compareResponse );
+    
+                CompareResponseDsml compareResponseDsml = new CompareResponseDsml( compareResponse );
+                batchResponse.addResponse( compareResponseDsml );
+                break;
 
-            ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( modifyDNResponse );
-            batchResponse.addResponse( modDNResponseDsml );
-        }
-        else if ( LdapConstants.EXTENDED_RESPONSE == response.getMessageType() )
-        {
-            ExtendedResponseCodec extendedResponse = response.getExtendedResponse();
-            copyMessageIdAndControls( response, extendedResponse );
+            case DEL_RESPONSE :
+                DelResponseCodec delResponse = (DelResponseCodec)response;
+                copyMessageIdAndControls( response, delResponse );
+    
+                DelResponseDsml delResponseDsml = new DelResponseDsml( delResponse );
+                batchResponse.addResponse( delResponseDsml );
+                break;
+                
+            case MODIFY_RESPONSE :
+                ModifyResponseCodec modifyResponse = (ModifyResponseCodec)response;
+                copyMessageIdAndControls( response, modifyResponse );
+    
+                ModifyResponseDsml modifyResponseDsml = new ModifyResponseDsml( modifyResponse );
+                batchResponse.addResponse( modifyResponseDsml );
+                break;
 
-            ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml( extendedResponse );
-            batchResponse.addResponse( extendedResponseDsml );
-        }
-        else if ( ( LdapConstants.SEARCH_RESULT_ENTRY == response.getMessageType() )
-            || ( LdapConstants.SEARCH_RESULT_REFERENCE == response.getMessageType() )
-            || ( LdapConstants.SEARCH_RESULT_DONE == response.getMessageType() ) )
-        {
-            // A SearchResponse can contains multiple responses of 3 types:
-            //     - 0 to n SearchResultEntry
-            //     - O to n SearchResultReference
-            //     - 1 (only) SearchResultDone
-            // So we have to include those individual reponses in a "General" SearchResponse
-            //            Element searchResponse = xmlResponse.getRootElement().addElement( "searchResponse" );
-            SearchResponseDsml searchResponseDsml = new SearchResponseDsml();
+            case MODIFYDN_RESPONSE :
+                ModifyDNResponseCodec modifyDNResponse = (ModifyDNResponseCodec)response;
+                copyMessageIdAndControls( response, modifyDNResponse );
+    
+                ModDNResponseDsml modDNResponseDsml = new ModDNResponseDsml( modifyDNResponse );
+                batchResponse.addResponse( modDNResponseDsml );
+                break;
 
-            // RequestID
-            int requestID = response.getMessageId();
-            if ( requestID != 0 )
-            {
-                searchResponseDsml.setMessageId( requestID );
-            }
+            case EXTENDED_RESPONSE :
+                ExtendedResponseCodec extendedResponse = (ExtendedResponseCodec)response;
+                copyMessageIdAndControls( response, extendedResponse );
+    
+                ExtendedResponseDsml extendedResponseDsml = new ExtendedResponseDsml( extendedResponse );
+                batchResponse.addResponse( extendedResponseDsml );
+                break;
 
-            while ( LdapConstants.SEARCH_RESULT_DONE != response.getMessageType() )
-            {
-                if ( LdapConstants.SEARCH_RESULT_ENTRY == response.getMessageType() )
+            case SEARCH_RESULT_ENTRY :
+            case SEARCH_RESULT_REFERENCE :
+            case SEARCH_RESULT_DONE :
+                // A SearchResponse can contains multiple responses of 3 types:
+                //     - 0 to n SearchResultEntry
+                //     - O to n SearchResultReference
+                //     - 1 (only) SearchResultDone
+                // So we have to include those individual responses in a "General" SearchResponse
+                //            Element searchResponse = xmlResponse.getRootElement().addElement( "searchResponse" );
+                SearchResponseDsml searchResponseDsml = null; //new SearchResponseDsml();
+    
+                // RequestID
+                int requestID = response.getMessageId();
+                
+                if ( requestID != 0 )
                 {
-                    SearchResultEntryCodec sre = response.getSearchResultEntry();
-                    copyMessageIdAndControls( response, sre );
-
-                    SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml( sre );
-                    searchResponseDsml.addResponse( searchResultEntryDsml );
+                    searchResponseDsml.setMessageId( requestID );
                 }
-                else if ( LdapConstants.SEARCH_RESULT_REFERENCE == response.getMessageType() )
+    
+                while ( MessageTypeEnum.SEARCH_RESULT_DONE != response.getMessageType() )
                 {
-                    SearchResultReferenceCodec srr = response.getSearchResultReference();
-                    copyMessageIdAndControls( response, srr );
-
-                    SearchResultReferenceDsml searchResultReferenceDsml = new SearchResultReferenceDsml( srr );
-                    searchResponseDsml.addResponse( searchResultReferenceDsml );
+                    if ( MessageTypeEnum.SEARCH_RESULT_ENTRY == response.getMessageType() )
+                    {
+                        SearchResultEntryCodec sre = (SearchResultEntryCodec)response;
+                        copyMessageIdAndControls( response, sre );
+    
+                        SearchResultEntryDsml searchResultEntryDsml = new SearchResultEntryDsml( sre );
+                        searchResponseDsml = new SearchResponseDsml( (LdapMessageCodec)sre );
+    
+                        if ( requestID != 0 )
+                        {
+                            searchResponseDsml.setMessageId( requestID );
+                        }
+    
+                        searchResponseDsml.addResponse( searchResultEntryDsml );
+                    }
+                    else if ( MessageTypeEnum.SEARCH_RESULT_REFERENCE == response.getMessageType() )
+                    {
+                        SearchResultReferenceCodec srr = (SearchResultReferenceCodec)response;
+                        copyMessageIdAndControls( response, srr );
+    
+                        SearchResultReferenceDsml searchResultReferenceDsml = new SearchResultReferenceDsml( srr );
+                        searchResponseDsml.addResponse( searchResultReferenceDsml );
+                    }
+    
+                    response = readResponse( bb );
                 }
-
-                response = readResponse( bb );
-            }
-
-            SearchResultDoneCodec srd = response.getSearchResultDone();
-            copyMessageIdAndControls( response, srd );
-
-            SearchResultDoneDsml searchResultDoneDsml = new SearchResultDoneDsml( srd );
-            searchResponseDsml.addResponse( searchResultDoneDsml );
+    
+                SearchResultDoneCodec srd = (SearchResultDoneCodec)response;
+                copyMessageIdAndControls( response, srd );
+    
+                SearchResultDoneDsml searchResultDoneDsml = new SearchResultDoneDsml( srd );
+                searchResponseDsml.addResponse( searchResultDoneDsml );
+                break;
         }
 
-        LdapResponseCodec realResponse = response.getLdapResponse();
+        LdapResponseCodec realResponse = (LdapResponseCodec)response;
 
         if ( !continueOnError )
         {
@@ -457,7 +460,6 @@
                 exit = true;
             }
         }
-
     }
 
 
@@ -585,7 +587,7 @@
 
         if ( messageResp instanceof BindResponseCodec )
         {
-            BindResponseCodec resp = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage().getBindResponse();
+            BindResponseCodec resp = ( ( LdapMessageContainer ) ldapMessageContainer ).getBindResponse();
 
             if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
             {
@@ -594,8 +596,7 @@
         }
         else if ( messageResp instanceof ExtendedResponseCodec )
         {
-            ExtendedResponseCodec resp = ( ( LdapMessageContainer ) ldapMessageContainer ).getLdapMessage()
-                .getExtendedResponse();
+            ExtendedResponseCodec resp = ( ( LdapMessageContainer ) ldapMessageContainer ).getExtendedResponse();
 
             if ( resp.getLdapResult().getResultCode() != ResultCodeEnum.SUCCESS )
             {
@@ -622,7 +623,6 @@
     private void bind( int messageId ) throws EncoderException, DecoderException, IOException, NamingException
     {
         BindRequestCodec bindRequest = new BindRequestCodec();
-        LdapMessageCodec message = new LdapMessageCodec();
         LdapAuthentication authentication = new SimpleAuthentication();
         ( ( SimpleAuthentication ) authentication ).setSimple( StringTools.getBytesUtf8( password ) );
 
@@ -630,11 +630,10 @@
         bindRequest.setName( new LdapDN( user ) );
         bindRequest.setVersion( 3 );
 
-        message.setProtocolOP( bindRequest );
-        message.setMessageId( messageId );
+        bindRequest.setMessageId( messageId );
 
         // Encode and send the bind request
-        ByteBuffer bb = message.encode( null );
+        ByteBuffer bb = bindRequest.encode();
         bb.flip();
 
         connect();

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AddResponseDsml.java Mon Feb 15 01:37:34 2010
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.add.AddResponseCodec;
 import org.dom4j.Element;
 
@@ -58,7 +59,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AuthResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AuthResponseDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AuthResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/AuthResponseDsml.java Mon Feb 15 01:37:34 2010
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.bind.BindResponseCodec;
 import org.dom4j.Element;
 
@@ -58,7 +59,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/CompareResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/CompareResponseDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/CompareResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/CompareResponseDsml.java Mon Feb 15 01:37:34 2010
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.compare.CompareResponseCodec;
 import org.dom4j.Element;
 
@@ -58,7 +59,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/DelResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/DelResponseDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/DelResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/DelResponseDsml.java Mon Feb 15 01:37:34 2010
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.del.DelResponseCodec;
 import org.dom4j.Element;
 
@@ -58,7 +59,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ErrorResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ErrorResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ErrorResponse.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ErrorResponse.java Mon Feb 15 01:37:34 2010
@@ -21,8 +21,12 @@
 package org.apache.directory.shared.dsmlv2.reponse;
 
 
+import java.nio.ByteBuffer;
+
+import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.dom4j.Element;
 
 
@@ -240,4 +244,31 @@
     {
         this.type = type;
     }
+
+
+    @Override
+    protected int computeLengthProtocolOp()
+    {
+        return 0;
+    }
+
+
+    @Override
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
+    {
+    }
+
+
+    @Override
+    public MessageTypeEnum getMessageType()
+    {
+        return null;
+    }
+
+
+    @Override
+    public String getMessageTypeName()
+    {
+        return null;
+    }
 }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ExtendedResponseDsml.java Mon Feb 15 01:37:34 2010
@@ -24,6 +24,7 @@
 import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.dsmlv2.ParserUtils;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.extended.ExtendedResponseCodec;
 import org.dom4j.Element;
 import org.dom4j.Namespace;
@@ -62,7 +63,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModDNResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModDNResponseDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModDNResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModDNResponseDsml.java Mon Feb 15 01:37:34 2010
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponseCodec;
 import org.dom4j.Element;
 
@@ -58,7 +59,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModifyResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModifyResponseDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModifyResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/ModifyResponseDsml.java Mon Feb 15 01:37:34 2010
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.modify.ModifyResponseCodec;
 import org.dom4j.Element;
 
@@ -58,7 +59,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponse.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponse.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponse.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponse.java Mon Feb 15 01:37:34 2010
@@ -21,10 +21,13 @@
 package org.apache.directory.shared.dsmlv2.reponse;
 
 
+import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.directory.shared.asn1.codec.EncoderException;
 import org.apache.directory.shared.ldap.codec.LdapResponseCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.search.SearchResultDoneCodec;
 import org.apache.directory.shared.ldap.codec.search.SearchResultEntryCodec;
 import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
@@ -170,4 +173,31 @@
     {
         this.searchResultDone = searchResultDone;
     }
+
+
+    @Override
+    protected int computeLengthProtocolOp()
+    {
+        return 0;
+    }
+
+
+    @Override
+    protected void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException
+    {
+    }
+
+
+    @Override
+    public MessageTypeEnum getMessageType()
+    {
+        return null;
+    }
+
+
+    @Override
+    public String getMessageTypeName()
+    {
+        return null;
+    }
 }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResponseDsml.java Mon Feb 15 01:37:34 2010
@@ -45,9 +45,9 @@
     /**
      * Creates a new instance of SearchResponseDsml.
      */
-    public SearchResponseDsml()
+    public SearchResponseDsml( LdapMessageCodec response )
     {
-        super( new LdapMessageCodec() );
+        super( response );
     }
 
 

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultDoneDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultDoneDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultDoneDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultDoneDsml.java Mon Feb 15 01:37:34 2010
@@ -22,6 +22,7 @@
 
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.search.SearchResultDoneCodec;
 import org.dom4j.Element;
 
@@ -58,7 +59,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultEntryDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultEntryDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultEntryDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultEntryDsml.java Mon Feb 15 01:37:34 2010
@@ -23,6 +23,7 @@
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.dsmlv2.ParserUtils;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.search.SearchResultEntryCodec;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -65,7 +66,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultReferenceDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultReferenceDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultReferenceDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/reponse/SearchResultReferenceDsml.java Mon Feb 15 01:37:34 2010
@@ -25,6 +25,7 @@
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
 import org.apache.directory.shared.ldap.util.LdapURL;
 import org.dom4j.Element;
@@ -62,7 +63,7 @@
     /* (non-Javadoc)
      * @see org.apache.directory.shared.dsmlv2.reponse.LdapMessageDecorator#getMessageType()
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbandonRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbandonRequestDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbandonRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbandonRequestDsml.java Mon Feb 15 01:37:34 2010
@@ -20,6 +20,7 @@
 package org.apache.directory.shared.dsmlv2.request;
 
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.abandon.AbandonRequestCodec;
 import org.dom4j.Element;
 
@@ -56,7 +57,7 @@
     /**
      * {@inheritDoc}
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AbstractRequestDsml.java Mon Feb 15 01:37:34 2010
@@ -22,7 +22,6 @@
 
 import org.apache.directory.shared.dsmlv2.DsmlDecorator;
 import org.apache.directory.shared.dsmlv2.ParserUtils;
-import org.apache.directory.shared.ldap.codec.LdapConstants;
 import org.apache.directory.shared.ldap.codec.LdapMessageCodec;
 import org.dom4j.Element;
 
@@ -76,24 +75,33 @@
     {
         switch ( instance.getMessageType() )
         {
-            case LdapConstants.ABANDON_REQUEST:
+            case ABANDON_REQUEST:
                 return "abandonRequest";
-            case LdapConstants.ADD_REQUEST:
+                
+            case ADD_REQUEST:
                 return "addRequest";
-            case LdapConstants.BIND_REQUEST:
+                
+            case BIND_REQUEST:
                 return "authRequest";
-            case LdapConstants.COMPARE_REQUEST:
+                
+            case COMPARE_REQUEST:
                 return "compareRequest";
-            case LdapConstants.DEL_REQUEST:
+                
+            case DEL_REQUEST:
                 return "delRequest";
-            case LdapConstants.EXTENDED_REQUEST:
+                
+            case EXTENDED_REQUEST:
                 return "extendedRequest";
-            case LdapConstants.MODIFYDN_REQUEST:
+                
+            case MODIFYDN_REQUEST:
                 return "modDNRequest";
-            case LdapConstants.MODIFY_REQUEST:
+                
+            case MODIFY_REQUEST:
                 return "modifyRequest";
-            case LdapConstants.SEARCH_REQUEST:
+                
+            case SEARCH_REQUEST:
                 return "searchRequest";
+                
             default:
                 return "error";
         }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AddRequestDsml.java Mon Feb 15 01:37:34 2010
@@ -23,6 +23,7 @@
 import javax.naming.NamingException;
 
 import org.apache.directory.shared.dsmlv2.ParserUtils;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.add.AddRequestCodec;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
@@ -65,7 +66,7 @@
     /**
      * {@inheritDoc}
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AuthRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AuthRequestDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AuthRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/AuthRequestDsml.java Mon Feb 15 01:37:34 2010
@@ -20,6 +20,7 @@
 package org.apache.directory.shared.dsmlv2.request;
 
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.bind.BindRequestCodec;
 import org.dom4j.Element;
 
@@ -56,7 +57,7 @@
     /**
      * {@inheritDoc}
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/CompareRequestDsml.java Mon Feb 15 01:37:34 2010
@@ -20,6 +20,7 @@
 package org.apache.directory.shared.dsmlv2.request;
 
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.compare.CompareRequestCodec;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.dom4j.Element;
@@ -57,7 +58,7 @@
     /**
      * {@inheritDoc}
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/DelRequestDsml.java Mon Feb 15 01:37:34 2010
@@ -20,6 +20,7 @@
 package org.apache.directory.shared.dsmlv2.request;
 
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.del.DelRequestCodec;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.dom4j.Element;
@@ -57,7 +58,7 @@
     /**
      * {@inheritDoc}
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ExtendedRequestDsml.java Mon Feb 15 01:37:34 2010
@@ -22,6 +22,7 @@
 
 import org.apache.directory.shared.asn1.primitives.OID;
 import org.apache.directory.shared.dsmlv2.ParserUtils;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.extended.ExtendedRequestCodec;
 import org.dom4j.Element;
 import org.dom4j.Namespace;
@@ -60,7 +61,7 @@
     /**
      * {@inheritDoc}
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyDNRequestDsml.java Mon Feb 15 01:37:34 2010
@@ -20,6 +20,7 @@
 package org.apache.directory.shared.dsmlv2.request;
 
 
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequestCodec;
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.shared.ldap.name.RDN;
@@ -58,7 +59,7 @@
     /**
      * {@inheritDoc}
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/ModifyRequestDsml.java Mon Feb 15 01:37:34 2010
@@ -24,6 +24,7 @@
 import java.util.List;
 
 import org.apache.directory.shared.dsmlv2.ParserUtils;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
@@ -65,7 +66,7 @@
     /**
      * {@inheritDoc}
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java (original)
+++ directory/shared/trunk/dsml-parser/src/main/java/org/apache/directory/shared/dsmlv2/request/SearchRequestDsml.java Mon Feb 15 01:37:34 2010
@@ -25,6 +25,7 @@
 import org.apache.directory.shared.dsmlv2.ParserUtils;
 import org.apache.directory.shared.ldap.codec.AttributeValueAssertion;
 import org.apache.directory.shared.ldap.codec.LdapConstants;
+import org.apache.directory.shared.ldap.codec.MessageTypeEnum;
 import org.apache.directory.shared.ldap.codec.search.AndFilter;
 import org.apache.directory.shared.ldap.codec.search.AttributeValueAssertionFilter;
 import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
@@ -73,7 +74,7 @@
     /**
      * {@inheritDoc}
      */
-    public int getMessageType()
+    public MessageTypeEnum getMessageType()
     {
         return instance.getMessageType();
     }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapConstants.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapConstants.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapConstants.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapConstants.java Mon Feb 15 01:37:34 2010
@@ -162,6 +162,7 @@
     public static final int EXTENSIBLE_MATCH_FILTER_TAG = 0xA9;
 
     // The messages types
+    /*
     public static final int ABANDON_REQUEST = 0;
 
     public static final int ADD_REQUEST = 1;
@@ -205,4 +206,5 @@
     public static final int INTERMEDIATE_RESPONSE = 20;
 
     public static final int UNKNOWN = -1; // Just in case ...
+    */
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapEncoder.java Mon Feb 15 01:37:34 2010
@@ -30,6 +30,7 @@
 import org.apache.directory.shared.asn1.codec.stateful.EncoderCallback;
 import org.apache.directory.shared.asn1.codec.stateful.EncoderMonitor;
 import org.apache.directory.shared.asn1.codec.stateful.StatefulEncoder;
+import org.apache.directory.shared.ldap.codec.add.AddRequestCodec;
 import org.apache.directory.shared.ldap.message.spi.Provider;
 import org.apache.directory.shared.ldap.message.spi.ProviderEncoder;
 import org.apache.directory.shared.ldap.message.spi.ProviderException;
@@ -93,7 +94,7 @@
             }
 
             ( ( OutputCallback ) encodeCallback ).attach( out );
-            encodeCallback.encodeOccurred( null, ( ( LdapMessageCodec ) obj ).encode( null ) );
+            encodeCallback.encodeOccurred( null, ( ( LdapMessageCodec ) obj ).encode() );
         }
         catch ( EncoderException e )
         {
@@ -122,7 +123,7 @@
                 log.debug( "Encoding this LdapMessage : " + obj );
             }
 
-            ByteBuffer pdu = ( ( LdapMessageCodec ) obj ).encode( null );
+            ByteBuffer pdu = ( ( LdapMessageCodec ) obj ).encode();
 
             if ( IS_DEBUG )
             {
@@ -159,7 +160,7 @@
                 log.debug( "Encoding this LdapMessage : " + obj );
             }
 
-            byte[] pdu = ( ( LdapMessageCodec ) obj ).encode( null ).array();
+            byte[] pdu = ( ( LdapMessageCodec ) obj ).encode().array();
 
             if ( IS_DEBUG )
             {
@@ -289,4 +290,47 @@
             this.channel = Channels.newChannel( out );
         }
     }
+    
+    
+    private static ByteBuffer encodeAsn1( AddRequestCodec addRequest )
+    {
+        //int length = computeLength( addRequest );
+        return null;
+    }
+    
+    
+    private static ByteBuffer encodeAsn1( LdapMessageCodec message ) throws EncoderException
+    {
+        ByteBuffer buffer = null;
+        
+        switch ( message.getMessageType() )
+        {
+            case ABANDON_REQUEST :
+                return encodeAsn1( message );
+                
+            case ADD_REQUEST :
+            case ADD_RESPONSE :
+            case BIND_REQUEST :
+            case BIND_RESPONSE :
+            case COMPARE_REQUEST :
+            case COMPARE_RESPONSE :
+            case DEL_REQUEST :
+            case DEL_RESPONSE :
+            case EXTENDED_REQUEST :
+            case EXTENDED_RESPONSE :
+            case INTERMEDIATE_RESPONSE :
+            case MODIFY_REQUEST :
+            case MODIFY_RESPONSE :
+            case MODIFYDN_REQUEST :
+            case MODIFYDN_RESPONSE :
+            case SEARCH_REQUEST :
+            case SEARCH_RESULT_DONE :
+            case SEARCH_RESULT_ENTRY :
+            case SEARCH_RESULT_REFERENCE  :
+            case UNBIND_REQUEST :
+            
+        }
+        
+        return buffer;
+    }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageCodec.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageCodec.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageCodec.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageCodec.java Mon Feb 15 01:37:34 2010
@@ -28,41 +28,19 @@
 import java.util.Map;
 
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
-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;
 import org.apache.directory.shared.asn1.codec.EncoderException;
-import org.apache.directory.shared.ldap.codec.abandon.AbandonRequestCodec;
-import org.apache.directory.shared.ldap.codec.add.AddRequestCodec;
-import org.apache.directory.shared.ldap.codec.add.AddResponseCodec;
-import org.apache.directory.shared.ldap.codec.bind.BindRequestCodec;
-import org.apache.directory.shared.ldap.codec.bind.BindResponseCodec;
-import org.apache.directory.shared.ldap.codec.compare.CompareRequestCodec;
-import org.apache.directory.shared.ldap.codec.compare.CompareResponseCodec;
 import org.apache.directory.shared.ldap.codec.controls.CodecControl;
 import org.apache.directory.shared.ldap.codec.controls.ManageDsaITControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncDoneValue.SyncDoneValueControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncInfoValue.SyncInfoValueControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncRequestValue.SyncRequestValueControl;
 import org.apache.directory.shared.ldap.codec.controls.replication.syncStateValue.SyncStateValueControl;
-import org.apache.directory.shared.ldap.codec.del.DelRequestCodec;
-import org.apache.directory.shared.ldap.codec.del.DelResponseCodec;
-import org.apache.directory.shared.ldap.codec.extended.ExtendedRequestCodec;
-import org.apache.directory.shared.ldap.codec.extended.ExtendedResponseCodec;
-import org.apache.directory.shared.ldap.codec.intermediate.IntermediateResponseCodec;
-import org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec;
-import org.apache.directory.shared.ldap.codec.modify.ModifyResponseCodec;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequestCodec;
-import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponseCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchResultDoneCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchResultEntryCodec;
-import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
 import org.apache.directory.shared.ldap.codec.search.controls.pagedSearch.PagedResultsControl;
 import org.apache.directory.shared.ldap.codec.search.controls.persistentSearch.PersistentSearchControl;
 import org.apache.directory.shared.ldap.codec.search.controls.subentries.SubentriesControl;
-import org.apache.directory.shared.ldap.codec.unbind.UnBindRequestCodec;
 import org.apache.directory.shared.ldap.message.control.Control;
 import org.apache.directory.shared.ldap.message.control.replication.SynchronizationInfoEnum;
 
@@ -74,7 +52,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$, 
  */
-public class LdapMessageCodec extends AbstractAsn1Object
+public abstract class LdapMessageCodec extends AbstractAsn1Object
 {
     // ~ Instance fields
     // ----------------------------------------------------------------------------
@@ -82,9 +60,6 @@
     /** The message ID */
     private int messageId;
 
-    /** The request or response being carried by the message */
-    private Asn1Object protocolOp;
-
     /** The controls */
     private List<Control> controls;
 
@@ -92,7 +67,7 @@
     private Control currentControl;
 
     /** The LdapMessage length */
-    private int ldapMessageLength;
+    protected int ldapMessageLength;
 
     /** The controls length */
     private int controlsLength;
@@ -273,10 +248,7 @@
      * 
      * @return The message type
      */
-    public int getMessageType()
-    {
-        return ( ( LdapMessageCodec ) protocolOp ).getMessageType();
-    }
+    public abstract MessageTypeEnum getMessageType();
 
 
     /**
@@ -284,353 +256,12 @@
      * 
      * @return The message type name
      */
-    public String getMessageTypeName()
-    {
-        switch ( ( ( LdapMessageCodec ) protocolOp ).getMessageType() )
-        {
-            case LdapConstants.ABANDON_REQUEST:
-                return "ABANDON_REQUEST";
-                
-            case LdapConstants.ADD_REQUEST:
-                return "ADD_REQUEST";
-                
-            case LdapConstants.ADD_RESPONSE:
-                return "ADD_RESPONSE";
-                
-            case LdapConstants.BIND_REQUEST:
-                return "BIND_REQUEST";
-                
-            case LdapConstants.BIND_RESPONSE:
-                return "BIND_RESPONSE";
-                
-            case LdapConstants.COMPARE_REQUEST:
-                return "COMPARE_REQUEST";
-                
-            case LdapConstants.COMPARE_RESPONSE:
-                return "COMPARE_RESPONSE";
-                
-            case LdapConstants.DEL_REQUEST:
-                return "DEL_REQUEST";
-                
-            case LdapConstants.DEL_RESPONSE:
-                return "DEL_RESPONSE";
-                
-            case LdapConstants.EXTENDED_REQUEST:
-                return "EXTENDED_REQUEST";
-                
-            case LdapConstants.EXTENDED_RESPONSE:
-                return "EXTENDED_RESPONSE";
-                
-            case LdapConstants.INTERMEDIATE_RESPONSE:
-                return "INTERMEDIATE_RESPONSE";
-                
-            case LdapConstants.MODIFYDN_REQUEST:
-                return "MODIFYDN_REQUEST";
-                
-            case LdapConstants.MODIFYDN_RESPONSE:
-                return "MODIFYDN_RESPONSE";
-                
-            case LdapConstants.MODIFY_REQUEST:
-                return "MODIFY_REQUEST";
-                
-            case LdapConstants.MODIFY_RESPONSE:
-                return "MODIFY_RESPONSE";
-                
-            case LdapConstants.SEARCH_REQUEST:
-                return "SEARCH_REQUEST";
-                
-            case LdapConstants.SEARCH_RESULT_DONE:
-                return "SEARCH_RESULT_DONE";
-                
-            case LdapConstants.SEARCH_RESULT_ENTRY:
-                return "SEARCH_RESULT_ENTRY";
-                
-            case LdapConstants.SEARCH_RESULT_REFERENCE:
-                return "SEARCH_RESULT_REFERENCE";
-                
-            case LdapConstants.UNBIND_REQUEST:
-                return "UNBIND_REQUEST";
-                
-            default:
-                return "UNKNOWN";
-        }
-    }
-
-
-    /**
-     * Get the encapsulated Ldap response.
-     * 
-     * @return Returns the Ldap response.
-     */
-    public LdapResponseCodec getLdapResponse()
-    {
-        return ( LdapResponseCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a AbandonRequest ldapObject, assuming that the caller knows that it
-     * is the LdapMessage exact type.
-     * 
-     * @return Returns the AbandonRequest ldapObject.
-     */
-    public AbandonRequestCodec getAbandonRequest()
-    {
-        return ( AbandonRequestCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a AddRequest ldapObject, assuming that the caller knows that it is
-     * the LdapMessage exact type.
-     * 
-     * @return Returns the AddRequest ldapObject.
-     */
-    public AddRequestCodec getAddRequest()
-    {
-        return ( AddRequestCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a AddResponse ldapObject, assuming that the caller knows that it is
-     * the LdapMessage exact type.
-     * 
-     * @return Returns the AddResponse ldapObject.
-     */
-    public AddResponseCodec getAddResponse()
-    {
-        return ( AddResponseCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a BindRequest ldapObject, assuming that the caller knows that it is
-     * the LdapMessage exact type.
-     * 
-     * @return Returns the BindRequest ldapObject.
-     */
-    public BindRequestCodec getBindRequest()
-    {
-        return ( BindRequestCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a BindResponse ldapObject, assuming that the caller knows that it is
-     * the LdapMessage exact type.
-     * 
-     * @return Returns the BindResponse ldapObject.
-     */
-    public BindResponseCodec getBindResponse()
-    {
-        return ( BindResponseCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a CompareRequest ldapObject, assuming that the caller knows that it
-     * is the LdapMessage exact type.
-     * 
-     * @return Returns the CompareRequest ldapObject.
-     */
-    public CompareRequestCodec getCompareRequest()
-    {
-        return ( CompareRequestCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a CompareResponse ldapObject, assuming that the caller knows that it
-     * is the LdapMessage exact type.
-     * 
-     * @return Returns the CompareResponse ldapObject.
-     */
-    public CompareResponseCodec getCompareResponse()
-    {
-        return ( CompareResponseCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a DelRequest ldapObject, assuming that the caller knows that it is
-     * the LdapMessage exact type.
-     * 
-     * @return Returns the DelRequest ldapObject.
-     */
-    public DelRequestCodec getDelRequest()
-    {
-        return ( DelRequestCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a DelResponse ldapObject, assuming that the caller knows that it is
-     * the LdapMessage exact type.
-     * 
-     * @return Returns the DelResponse ldapObject.
-     */
-    public DelResponseCodec getDelResponse()
-    {
-        return ( DelResponseCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a ExtendedRequest ldapObject, assuming that the caller knows that it
-     * is the LdapMessage exact type.
-     * 
-     * @return Returns the ExtendedRequest ldapObject.
-     */
-    public ExtendedRequestCodec getExtendedRequest()
-    {
-        return ( ExtendedRequestCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a ExtendedResponse ldapObject, assuming that the caller knows that it
-     * is the LdapMessage exact type.
-     * 
-     * @return Returns the ExtendedResponse ldapObject.
-     */
-    public ExtendedResponseCodec getExtendedResponse()
-    {
-        return ( ExtendedResponseCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a IntermediateResponse ldapObject, assuming that the caller knows that it
-     * is the LdapMessage exact type.
-     * 
-     * @return Returns the IntermediateResponse ldapObject.
-     */
-    public IntermediateResponseCodec getIntermediateResponse()
-    {
-        return ( IntermediateResponseCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a ModifyDNRequest ldapObject, assuming that the caller knows that it
-     * is the LdapMessage exact type.
-     * 
-     * @return Returns the ModifyDNRequest ldapObject.
-     */
-    public ModifyDNRequestCodec getModifyDNRequest()
-    {
-        return ( ModifyDNRequestCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a ModifyDNResponse ldapObject, assuming that the caller knows that it
-     * is the LdapMessage exact type.
-     * 
-     * @return Returns the ModifyDNResponse ldapObject.
-     */
-    public ModifyDNResponseCodec getModifyDNResponse()
-    {
-        return ( ModifyDNResponseCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a ModifyRequest ldapObject, assuming that the caller knows that it is
-     * the LdapMessage exact type.
-     * 
-     * @return Returns the ModifyRequest ldapObject.
-     */
-    public ModifyRequestCodec getModifyRequest()
-    {
-        return ( ModifyRequestCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a ModifyResponse ldapObject, assuming that the caller knows that it
-     * is the LdapMessage exact type.
-     * 
-     * @return Returns the ModifyResponse ldapObject.
-     */
-    public ModifyResponseCodec getModifyResponse()
-    {
-        return ( ModifyResponseCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a SearchRequest ldapObject, assuming that the caller knows that it is
-     * the LdapMessage exact type.
-     * 
-     * @return Returns the SearchRequest ldapObject.
-     */
-    public SearchRequestCodec getSearchRequest()
-    {
-        return ( SearchRequestCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a SearchResultDone ldapObject, assuming that the caller knows that it
-     * is the LdapMessage exact type.
-     * 
-     * @return Returns the SearchRequestDone ldapObject.
-     */
-    public SearchResultDoneCodec getSearchResultDone()
-    {
-        return ( SearchResultDoneCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a SearchResultEntry ldapObject, assuming that the caller knows that
-     * it is the LdapMessage exact type.
-     * 
-     * @return Returns the SearchResultEntry ldapObject.
-     */
-    public SearchResultEntryCodec getSearchResultEntry()
-    {
-        return ( SearchResultEntryCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a SearchResultReference ldapObject, assuming that the caller knows
-     * that it is the LdapMessage exact type.
-     * 
-     * @return Returns the SearchResultReference ldapObject.
-     */
-    public SearchResultReferenceCodec getSearchResultReference()
-    {
-        return ( SearchResultReferenceCodec ) protocolOp;
-    }
-
-
-    /**
-     * Get a UnBindRequest ldapObject, assuming that the caller knows that it is
-     * the LdapMessage exact type.
-     * 
-     * @return Returns the UnBindRequest ldapObject.
-     */
-    public UnBindRequestCodec getUnBindRequest()
-    {
-        return ( UnBindRequestCodec ) protocolOp;
-    }
-
-
-    /**
-     * Set the ProtocolOP
-     * 
-     * @param protocolOp The protocolOp to set.
-     */
-    public void setProtocolOP( Asn1Object protocolOp )
-    {
-        this.protocolOp = protocolOp;
-    }
+    public abstract String getMessageTypeName();
 
+    
+    protected abstract int computeLengthProtocolOp();
 
+    
     /**
      * Compute the LdapMessage length LdapMessage : 
      * 0x30 L1 
@@ -652,7 +283,7 @@
         ldapMessageLength = 1 + 1 + Value.getNbBytes( messageId );
 
         // Get the protocolOp length
-        int protocolOpLength = protocolOp.computeLength();
+        int protocolOpLength = computeLengthProtocolOp();
 
         // Add the protocol length to the message length
         ldapMessageLength += protocolOpLength;
@@ -702,6 +333,8 @@
         return 1 + ldapMessageLength + TLV.getNbBytes( ldapMessageLength );
     }
 
+    
+    protected abstract void encodeProtocolOp( ByteBuffer buffer ) throws EncoderException;
 
     /**
      * Generate the PDU which contains the encoded object. 
@@ -727,7 +360,7 @@
      * @return A ByteBuffer that contaons the 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() );
@@ -749,7 +382,7 @@
         Value.encode( bb, messageId );
 
         // Add the protocolOp part
-        protocolOp.encode( bb );
+        encodeProtocolOp( bb );
 
         // Do the same thing for Controls, if any.
         if ( controls != null )
@@ -774,13 +407,14 @@
      * 
      * @return A LdapMessage String
      */
-    public String toString()
+    protected String toString( String protocolOp )
     {
         StringBuffer sb = new StringBuffer();
 
         sb.append( "LdapMessage\n" );
         sb.append( "    message Id : " ).append( messageId ).append( '\n' );
-        sb.append( protocolOp );
+        
+        sb.append( protocolOp ).append( '\n' );
 
         if ( controls != null )
         {

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java?rev=910150&r1=910149&r2=910150&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java (original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageContainer.java Mon Feb 15 01:37:34 2010
@@ -21,7 +21,28 @@
 
 
 import org.apache.directory.shared.asn1.ber.AbstractContainer;
+import org.apache.directory.shared.ldap.codec.abandon.AbandonRequestCodec;
+import org.apache.directory.shared.ldap.codec.add.AddRequestCodec;
+import org.apache.directory.shared.ldap.codec.add.AddResponseCodec;
+import org.apache.directory.shared.ldap.codec.bind.BindRequestCodec;
+import org.apache.directory.shared.ldap.codec.bind.BindResponseCodec;
+import org.apache.directory.shared.ldap.codec.compare.CompareRequestCodec;
+import org.apache.directory.shared.ldap.codec.compare.CompareResponseCodec;
 import org.apache.directory.shared.ldap.codec.controls.AbstractControl;
+import org.apache.directory.shared.ldap.codec.del.DelRequestCodec;
+import org.apache.directory.shared.ldap.codec.del.DelResponseCodec;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedRequestCodec;
+import org.apache.directory.shared.ldap.codec.extended.ExtendedResponseCodec;
+import org.apache.directory.shared.ldap.codec.intermediate.IntermediateResponseCodec;
+import org.apache.directory.shared.ldap.codec.modify.ModifyRequestCodec;
+import org.apache.directory.shared.ldap.codec.modify.ModifyResponseCodec;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNRequestCodec;
+import org.apache.directory.shared.ldap.codec.modifyDn.ModifyDNResponseCodec;
+import org.apache.directory.shared.ldap.codec.search.SearchRequestCodec;
+import org.apache.directory.shared.ldap.codec.search.SearchResultDoneCodec;
+import org.apache.directory.shared.ldap.codec.search.SearchResultEntryCodec;
+import org.apache.directory.shared.ldap.codec.search.SearchResultReferenceCodec;
+import org.apache.directory.shared.ldap.codec.unbind.UnBindRequestCodec;
 import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 
 
@@ -95,7 +116,205 @@
         return ldapMessage;
     }
 
+    
+    /**
+     * @return Returns the LdapResponse.
+     */
+    public LdapResponseCodec getLdapResponse()
+    {
+        return (LdapResponseCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the AbandonRequest stored in the container
+     */
+    public AbandonRequestCodec getAbandonRequest()
+    {
+        return (AbandonRequestCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the AddRequest stored in the container
+     */
+    public AddRequestCodec getAddRequest()
+    {
+        return (AddRequestCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the AddResponse stored in the container
+     */
+    public AddResponseCodec getAddResponse()
+    {
+        return (AddResponseCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the BindRequest stored in the container
+     */
+    public BindRequestCodec getBindRequest()
+    {
+        return (BindRequestCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the BindResponse stored in the container
+     */
+    public BindResponseCodec getBindResponse()
+    {
+        return (BindResponseCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the CompareRequest stored in the container
+     */
+    public CompareRequestCodec getCompareRequest()
+    {
+        return (CompareRequestCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the CompareResponse stored in the container
+     */
+    public CompareResponseCodec getCompareResponse()
+    {
+        return (CompareResponseCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the DelRequest stored in the container
+     */
+    public DelRequestCodec getDelRequest()
+    {
+        return (DelRequestCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the DelResponse stored in the container
+     */
+    public DelResponseCodec getDelResponse()
+    {
+        return (DelResponseCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the ExtendedRequest stored in the container
+     */
+    public ExtendedRequestCodec getExtendedRequest()
+    {
+        return (ExtendedRequestCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the ExtendedResponse stored in the container
+     */
+    public ExtendedResponseCodec getExtendedResponse()
+    {
+        return (ExtendedResponseCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the IntermediateResponse stored in the container
+     */
+    public IntermediateResponseCodec getIntermediateResponse()
+    {
+        return (IntermediateResponseCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the ModifyRequest stored in the container
+     */
+    public ModifyRequestCodec getModifyRequest()
+    {
+        return (ModifyRequestCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the ModifyResponse stored in the container
+     */
+    public ModifyResponseCodec getModifyResponse()
+    {
+        return (ModifyResponseCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the ModifyDnRequest stored in the container
+     */
+    public ModifyDNRequestCodec getModifyDnRequest()
+    {
+        return (ModifyDNRequestCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the ModifyDnResponse stored in the container
+     */
+    public ModifyDNResponseCodec getModifyDnResponse()
+    {
+        return (ModifyDNResponseCodec)ldapMessage;
+    }
 
+    
+    /**
+     * @return Returns the SearchRequest stored in the container
+     */
+    public SearchRequestCodec getSearchRequest()
+    {
+        return (SearchRequestCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the SearchResultEntryCodec stored in the container
+     */
+    public SearchResultEntryCodec getSearchResultEntry()
+    {
+        return (SearchResultEntryCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the SearchResultReferenceCodec stored in the container
+     */
+    public SearchResultReferenceCodec getSearchResultReference()
+    {
+        return (SearchResultReferenceCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the SearchResultDone stored in the container
+     */
+    public SearchResultDoneCodec getSearchResultDone()
+    {
+        return (SearchResultDoneCodec)ldapMessage;
+    }
+
+    
+    /**
+     * @return Returns the UnbindRequest stored in the container
+     */
+    public UnBindRequestCodec getUnbindRequest()
+    {
+        return (UnBindRequestCodec)ldapMessage;
+    }
+
+    
     /**
      * Set a ldapMessage Object into the container. It will be completed by the
      * ldapDecoder .



Mime
View raw message