directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r987606 [10/25] - in /directory/shared/trunk: ./ all/ asn1-codec/ asn1-codec/src/main/java/org/apache/directory/shared/asn1/codec/ asn1/ asn1/src/main/java/org/apache/directory/shared/asn1/ber/grammar/ asn1/src/main/java/org/apache/director...
Date Fri, 20 Aug 2010 19:23:37 GMT
Propchange: directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,8 @@
-/directory/shared/branches-dnfactory-experiment/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:980350-980351
+/directory/shared/branches/shared-codec-merge/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:980352-980933
 /directory/shared/branches/shared-replication/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:749791-764113
 /directory/shared/branches/shared-schema/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:806622-893998
 /directory/shared/branches/shared-subtree/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:965208-965686
 /directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:945830-946347
-/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:806622-894844*,980025-980349
+/directory/shared/branches-dnfactory-experiment/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:980350-980351
+/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl:806622-894844*

Propchange: directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Aug 20 19:23:27 2010
@@ -1,7 +1,8 @@
-/directory/shared/branches-dnfactory-experiment/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:980350-980351
+/directory/shared/branches/shared-codec-merge/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:982370-987558
 /directory/shared/branches/shared-dnfactory-experiment/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:980352-980933
 /directory/shared/branches/shared-replication/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:749791-764113
 /directory/shared/branches/shared-schema/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:806622-893998
 /directory/shared/branches/shared-subtree/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:965208-965686
 /directory/shared/branches/xdbm-refactoring/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:945830-946347
-/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:806622-894844,980025-980349
+/directory/shared/branches-dnfactory-experiment/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:980350-980351
+/directory/shared/trunk/ldap-schema-manager/src/main/java/org/apache/directory/shared/ldap/schema/manager/impl/DefaultSchemaManager.java:806622-894844

Modified: directory/shared/trunk/ldap/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/pom.xml?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/ldap/pom.xml (original)
+++ directory/shared/trunk/ldap/pom.xml Fri Aug 20 19:23:27 2010
@@ -66,6 +66,11 @@
       <groupId>commons-collections</groupId>
       <artifactId>commons-collections</artifactId>
     </dependency>
+
+    <dependency>
+      <groupId>org.apache.mina</groupId>
+      <artifactId>mina-core</artifactId>
+    </dependency>
   </dependencies>
 
   <build>

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapDecoder.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapDecoder.java?rev=987606&r1=987605&r2=987606&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapDecoder.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/LdapDecoder.java
Fri Aug 20 19:23:27 2010
@@ -27,7 +27,6 @@ import org.apache.directory.shared.asn1.
 import org.apache.directory.shared.asn1.ber.tlv.TLVStateEnum;
 import org.apache.directory.shared.asn1.codec.DecoderException;
 import org.apache.directory.shared.asn1.codec.stateful.DecoderCallback;
-import org.apache.directory.shared.asn1.codec.stateful.DecoderMonitor;
 import org.apache.directory.shared.i18n.I18n;
 import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 import org.apache.directory.shared.ldap.message.spi.Provider;
@@ -76,7 +75,7 @@ public class LdapDecoder implements Prov
         this.provider = provider;
         ldapMessageContainer = new LdapMessageContainer( binaryAttributeDetector );
         ldapDecoder = new Asn1Decoder();
-        
+
         ldapMessageContainer.setMaxPDUSize( maxPDUSize );
     }
 
@@ -110,23 +109,23 @@ public class LdapDecoder implements Prov
             try
             {
                 ldapDecoder.decode( buf, ldapMessageContainer );
-    
+
                 if ( IS_DEBUG )
                 {
                     log.debug( "Decoding the PDU : " );
-    
+
                     int size = buf.position();
                     buf.flip();
-                    
-                    byte[] array = new byte[ size - position ];
-                    
+
+                    byte[] array = new byte[size - position];
+
                     for ( int i = position; i < size; i++ )
                     {
-                        array[ i ] = buf.get();
+                        array[i] = buf.get();
                     }
-    
+
                     position = size;
-                    
+
                     if ( array.length == 0 )
                     {
                         log.debug( "NULL buffer, what the HELL ???" );
@@ -136,16 +135,17 @@ public class LdapDecoder implements Prov
                         log.debug( StringTools.dumpBytes( array ) );
                     }
                 }
-                
+
                 if ( ldapMessageContainer.getState() == TLVStateEnum.PDU_DECODED )
                 {
                     if ( IS_DEBUG )
                     {
-                        log.debug( "Decoded LdapMessage : " + ldapMessageContainer.getLdapMessage()
);
+                        log.debug( "Decoded LdapMessage : " + ldapMessageContainer.getMessage()
);
                         buf.mark();
                     }
-    
-                    decoderCallback.decodeOccurred( null, ldapMessageContainer.getLdapMessage()
);
+
+                    decoderCallback.decodeOccurred( null, ldapMessageContainer.getMessage()
);
+
                     ldapMessageContainer.clean();
                 }
             }
@@ -214,10 +214,10 @@ public class LdapDecoder implements Prov
             {
                 if ( IS_DEBUG )
                 {
-                    log.debug( "Decoded LdapMessage : " + ldapMessageContainer.getLdapMessage()
);
+                    log.debug( "Decoded LdapMessage : " + ldapMessageContainer.getMessage()
);
                 }
 
-                return ldapMessageContainer.getLdapMessage();
+                return ldapMessageContainer.getMessage();
             }
             else
             {
@@ -254,10 +254,10 @@ public class LdapDecoder implements Prov
             {
                 if ( IS_DEBUG )
                 {
-                    log.debug( "Decoded LdapMessage : " + ldapMessageContainer.getLdapMessage()
);
+                    log.debug( "Decoded LdapMessage : " + ldapMessageContainer.getMessage()
);
                 }
 
-                return ldapMessageContainer.getLdapMessage();
+                return ldapMessageContainer.getMessage();
             }
             else
             {
@@ -283,22 +283,21 @@ public class LdapDecoder implements Prov
 
 
     /**
-     * Not used ...
+     * Set the callback to call when the PDU has been decoded
      * 
-     * @deprecated
+     * @param cb The callback
      */
-    public void setDecoderMonitor( DecoderMonitor monitor )
+    public void setCallback( DecoderCallback cb )
     {
+        decoderCallback = cb;
     }
 
 
     /**
-     * Set the callback to call when the PDU has been decoded
-     * 
-     * @param cb The callback
+     * {@inheritDoc}
      */
-    public void setCallback( DecoderCallback cb )
+    public DecoderCallback getCallback()
     {
-        decoderCallback = cb;
+        return decoderCallback;
     }
 }

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=987606&r1=987605&r2=987606&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
Fri Aug 20 19:23:27 2010
@@ -20,21 +20,14 @@
 package org.apache.directory.shared.ldap.codec;
 
 
-import java.io.IOException;
 import java.io.OutputStream;
 import java.nio.ByteBuffer;
-import java.nio.channels.Channels;
-import java.nio.channels.WritableByteChannel;
 
 import org.apache.directory.shared.asn1.codec.EncoderException;
 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.i18n.I18n;
 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;
-import org.apache.directory.shared.ldap.util.StringTools;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,22 +39,15 @@ import org.slf4j.LoggerFactory;
  */
 public class LdapEncoder implements ProviderEncoder
 {
-    //TM private static long cumul = 0L;
-    //TM private static long count = 0L;
-    //TM private Object lock = new Object();
-
     /** The logger */
     private static Logger log = LoggerFactory.getLogger( LdapEncoder.class );
 
     /** A speedup for logger */
     private static final boolean IS_DEBUG = log.isDebugEnabled();
-    
+
     /** The associated Provider */
     final Provider provider;
 
-    /** The callback to call when the encoding is done */
-    private EncoderCallback encodeCallback;
-
 
     /**
      * Creates an instance of a Ldap Encoder implementation.
@@ -71,7 +57,6 @@ public class LdapEncoder implements Prov
     public LdapEncoder( Provider provider )
     {
         this.provider = provider;
-        encodeCallback = new OutputCallback();
     }
 
 
@@ -85,23 +70,6 @@ public class LdapEncoder implements Prov
      */
     public void encodeBlocking( Object lock, OutputStream out, Object obj ) throws ProviderException
     {
-        try
-        {
-            if ( IS_DEBUG )
-            {
-                log.debug( "Encoding this LdapMessage : " + obj );
-            }
-
-            ( ( OutputCallback ) encodeCallback ).attach( out );
-            encodeCallback.encodeOccurred( null, ( ( LdapMessageCodec ) obj ).encode() );
-        }
-        catch ( EncoderException e )
-        {
-            String msg = I18n.err( I18n.ERR_04065, obj, e.getLocalizedMessage() );
-            log.error( msg );
-            ProviderException pe = new ProviderException( provider, msg );
-            throw pe;
-        }
     }
 
 
@@ -115,66 +83,7 @@ public class LdapEncoder implements Prov
      */
     public ByteBuffer encodeBlocking( Object obj ) throws ProviderException
     {
-        try
-        {
-            if ( IS_DEBUG )
-            {
-                log.debug( "Encoding this LdapMessage : " + obj );
-            }
-
-            ByteBuffer pdu = ( ( LdapMessageCodec ) obj ).encode();
-
-            if ( IS_DEBUG )
-            {
-                log.debug( "Encoded PDU : " + StringTools.dumpBytes( pdu.array() ) );
-            }
-
-            pdu.flip();
-            return pdu;
-        }
-        catch ( EncoderException e )
-        {
-            String msg = I18n.err( I18n.ERR_04065, obj, e.getLocalizedMessage() );
-            log.error( msg );
-            ProviderException pe = new ProviderException( provider, msg );
-            throw pe;
-        }
-    }
-
-
-    /**
-     * Encodes a LdapMessage, and return a byte array containing the resulting
-     * PDU
-     * 
-     * @param obj The LdapMessage to encode
-     * @return The byte[] containing the PDU
-     * @throws ProviderException If anything went wrong
-     */
-    public byte[] encodeToArray( Object obj ) throws ProviderException
-    {
-        try
-        {
-            if ( IS_DEBUG )
-            {
-                log.debug( "Encoding this LdapMessage : " + obj );
-            }
-
-            byte[] pdu = ( ( LdapMessageCodec ) obj ).encode().array();
-
-            if ( IS_DEBUG )
-            {
-                log.debug( "Encoded PDU : " + StringTools.dumpBytes( pdu ) );
-            }
-
-            return pdu;
-        }
-        catch ( EncoderException e )
-        {
-            String msg = I18n.err( I18n.ERR_04065,  obj, e.getLocalizedMessage() );
-            log.error( msg );
-            ProviderException pe = new ProviderException( provider, msg );
-            throw pe;
-        }
+        return null;
     }
 
 
@@ -195,25 +104,8 @@ public class LdapEncoder implements Prov
      * @param obj The LdapMessage to encode
      * @throws EncoderException If anything went wrong
      */
-    public void encode( Object obj ) throws EncoderException
+    public void encode( Object request ) throws EncoderException
     {
-        //TM long t0 = System.nanoTime();
-        ByteBuffer encoded = encodeBlocking( obj );
-        encodeCallback.encodeOccurred( null, encoded );
-        //TM long t1 = System.nanoTime();
-        
-        //TM synchronized (lock)
-        //TM {
-        //TM     cumul += (t1 - t0);
-        //TM     count++;
-        //TM    
-        //TM
-        //TM     if ( count % 1000L == 0)
-        //TM     {
-        //TM         System.out.println( "Encode cost : " + (cumul/count) );
-        //TM         cumul = 0L;
-        //TM     }
-        //TM }
     }
 
 
@@ -224,68 +116,5 @@ public class LdapEncoder implements Prov
      */
     public void setCallback( EncoderCallback cb )
     {
-        encodeCallback = cb;
-    }
-
-
-    /**
-     * Not used ...
-     * 
-     * @deprecated
-     */
-    public void setEncoderMonitor( EncoderMonitor monitor )
-    {
-    }
-
-    /**
-     * The inner class used to write the PDU to a channel.
-     */
-    class OutputCallback implements EncoderCallback
-    {
-        /** The channel in which the PDU will be written */
-        private WritableByteChannel channel = null;
-
-
-        /**
-         * Callback to deliver a fully encoded object.
-         * 
-         * @param encoder the stateful encoder driving the callback
-         * @param encoded the object that was encoded
-         */
-        public void encodeOccurred( StatefulEncoder encoder, Object encoded )
-        {
-            try
-            {
-                ( ( ByteBuffer ) encoded ).flip();
-                channel.write( ( ByteBuffer ) encoded );
-            }
-            catch ( IOException e )
-            {
-                ProviderException pe = new ProviderException( provider, I18n.err( I18n.ERR_04065,
"", e.getLocalizedMessage() ) );
-                throw pe;
-            }
-        }
-
-
-        /**
-         * Associate a channel to the callback
-         * 
-         * @param channel The channel to use to write a PDU
-         */
-        void attach( WritableByteChannel channel )
-        {
-            this.channel = channel;
-        }
-
-
-        /**
-         * Associate a OutputStream to the callback. A channel will be created.
-         * 
-         * @param out The OutputStream to use
-         */
-        void attach( OutputStream out )
-        {
-            this.channel = Channels.newChannel( out );
-        }
     }
 }

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=987606&r1=987605&r2=987606&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
Fri Aug 20 19:23:27 2010
@@ -21,28 +21,29 @@ package org.apache.directory.shared.ldap
 
 
 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.AbandonRequest;
+import org.apache.directory.shared.ldap.message.AddRequest;
+import org.apache.directory.shared.ldap.message.AddResponse;
+import org.apache.directory.shared.ldap.message.BindRequest;
+import org.apache.directory.shared.ldap.message.BindResponse;
+import org.apache.directory.shared.ldap.message.CompareRequest;
+import org.apache.directory.shared.ldap.message.CompareResponse;
+import org.apache.directory.shared.ldap.message.DeleteRequest;
+import org.apache.directory.shared.ldap.message.DeleteResponse;
+import org.apache.directory.shared.ldap.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.message.ExtendedResponse;
+import org.apache.directory.shared.ldap.message.IntermediateResponse;
+import org.apache.directory.shared.ldap.message.Message;
+import org.apache.directory.shared.ldap.message.ModifyDnRequest;
+import org.apache.directory.shared.ldap.message.ModifyDnResponse;
+import org.apache.directory.shared.ldap.message.ModifyRequest;
+import org.apache.directory.shared.ldap.message.ModifyResponse;
+import org.apache.directory.shared.ldap.message.SearchRequest;
+import org.apache.directory.shared.ldap.message.SearchResultDone;
+import org.apache.directory.shared.ldap.message.SearchResultEntry;
+import org.apache.directory.shared.ldap.message.SearchResultReference;
+import org.apache.directory.shared.ldap.message.UnbindRequest;
 import org.apache.directory.shared.ldap.message.spi.BinaryAttributeDetector;
 
 
@@ -58,18 +59,19 @@ public class LdapMessageContainer extend
     // ~ Instance fields
     // ----------------------------------------------------------------------------
 
-    /** The ldap message */
-    private LdapMessageCodec ldapMessage;
+    /** The internal ldap message */
+    private Message message;
 
     /** checks if attribute is binary */
     private final BinaryAttributeDetector binaryAttributeDetector;
 
     /** The message ID */
     private int messageId;
-    
+
     /** The current control */
     private AbstractControl currentControl;
 
+
     // ~ Constructors
     // -------------------------------------------------------------------------------
 
@@ -81,11 +83,11 @@ public class LdapMessageContainer extend
     {
         this( new BinaryAttributeDetector()
         {
-            public boolean isBinary( String attributeId ) 
+            public boolean isBinary( String attributeId )
             {
                 return false;
             }
-        });
+        } );
     }
 
 
@@ -110,219 +112,210 @@ public class LdapMessageContainer extend
     /**
      * @return Returns the ldapMessage.
      */
-    public LdapMessageCodec getLdapMessage()
+    public Message getMessage()
     {
-        return ldapMessage;
+        return message;
     }
 
-    
-    /**
-     * @return Returns the LdapResponse.
-     */
-    public LdapResponseCodec getLdapResponse()
-    {
-        return (LdapResponseCodec)ldapMessage;
-    }
 
-    
     /**
      * @return Returns the AbandonRequest stored in the container
      */
-    public AbandonRequestCodec getAbandonRequest()
+    public AbandonRequest getAbandonRequest()
     {
-        return (AbandonRequestCodec)ldapMessage;
+        return ( AbandonRequest ) message;
     }
 
-    
+
     /**
      * @return Returns the AddRequest stored in the container
      */
-    public AddRequestCodec getAddRequest()
+    public AddRequest getAddRequest()
     {
-        return (AddRequestCodec)ldapMessage;
+        return ( AddRequest ) message;
     }
 
-    
+
     /**
      * @return Returns the AddResponse stored in the container
      */
-    public AddResponseCodec getAddResponse()
+    public AddResponse getAddResponse()
     {
-        return (AddResponseCodec)ldapMessage;
+        return ( AddResponse ) message;
     }
 
-    
+
     /**
      * @return Returns the BindRequest stored in the container
      */
-    public BindRequestCodec getBindRequest()
+    public BindRequest getBindRequest()
     {
-        return (BindRequestCodec)ldapMessage;
+        return ( BindRequest ) message;
     }
 
-    
+
     /**
      * @return Returns the BindResponse stored in the container
      */
-    public BindResponseCodec getBindResponse()
+    public BindResponse getBindResponse()
     {
-        return (BindResponseCodec)ldapMessage;
+        return ( BindResponse ) message;
     }
 
-    
+
     /**
      * @return Returns the CompareRequest stored in the container
      */
-    public CompareRequestCodec getCompareRequest()
+    public CompareRequest getCompareRequest()
     {
-        return (CompareRequestCodec)ldapMessage;
+        return ( CompareRequest ) message;
     }
 
-    
+
     /**
      * @return Returns the CompareResponse stored in the container
      */
-    public CompareResponseCodec getCompareResponse()
+    public CompareResponse getCompareResponse()
     {
-        return (CompareResponseCodec)ldapMessage;
+        return ( CompareResponse ) message;
     }
 
-    
+
     /**
      * @return Returns the DelRequest stored in the container
      */
-    public DelRequestCodec getDelRequest()
+    public DeleteRequest getDeleteRequest()
     {
-        return (DelRequestCodec)ldapMessage;
+        return ( DeleteRequest ) message;
     }
 
-    
+
     /**
      * @return Returns the DelResponse stored in the container
      */
-    public DelResponseCodec getDelResponse()
+    public DeleteResponse getDeleteResponse()
     {
-        return (DelResponseCodec)ldapMessage;
+        return ( DeleteResponse ) message;
     }
 
-    
+
     /**
      * @return Returns the ExtendedRequest stored in the container
      */
-    public ExtendedRequestCodec getExtendedRequest()
+    public ExtendedRequest getExtendedRequest()
     {
-        return (ExtendedRequestCodec)ldapMessage;
+        return ( ExtendedRequest ) message;
     }
 
-    
+
     /**
      * @return Returns the ExtendedResponse stored in the container
      */
-    public ExtendedResponseCodec getExtendedResponse()
+    public ExtendedResponse getExtendedResponse()
     {
-        return (ExtendedResponseCodec)ldapMessage;
+        return ( ExtendedResponse ) message;
     }
 
-    
+
     /**
      * @return Returns the IntermediateResponse stored in the container
      */
-    public IntermediateResponseCodec getIntermediateResponse()
+    public IntermediateResponse getIntermediateResponse()
     {
-        return (IntermediateResponseCodec)ldapMessage;
+        return ( IntermediateResponse ) message;
     }
 
-    
+
     /**
      * @return Returns the ModifyRequest stored in the container
      */
-    public ModifyRequestCodec getModifyRequest()
+    public ModifyRequest getModifyRequest()
     {
-        return (ModifyRequestCodec)ldapMessage;
+        return ( ModifyRequest ) message;
     }
 
-    
+
     /**
      * @return Returns the ModifyResponse stored in the container
      */
-    public ModifyResponseCodec getModifyResponse()
+    public ModifyResponse getModifyResponse()
     {
-        return (ModifyResponseCodec)ldapMessage;
+        return ( ModifyResponse ) message;
     }
 
-    
+
     /**
      * @return Returns the ModifyDnRequest stored in the container
      */
-    public ModifyDNRequestCodec getModifyDnRequest()
+    public ModifyDnRequest getModifyDnRequest()
     {
-        return (ModifyDNRequestCodec)ldapMessage;
+        return ( ModifyDnRequest ) message;
     }
 
-    
+
     /**
      * @return Returns the ModifyDnResponse stored in the container
      */
-    public ModifyDNResponseCodec getModifyDnResponse()
+    public ModifyDnResponse getModifyDnResponse()
     {
-        return (ModifyDNResponseCodec)ldapMessage;
+        return ( ModifyDnResponse ) message;
     }
 
-    
+
     /**
      * @return Returns the SearchRequest stored in the container
      */
-    public SearchRequestCodec getSearchRequest()
+    public SearchRequest getSearchRequest()
     {
-        return (SearchRequestCodec)ldapMessage;
+        return ( SearchRequest ) message;
     }
 
-    
+
     /**
-     * @return Returns the SearchResultEntryCodec stored in the container
+     * @return Returns the SearchResultEntry stored in the container
      */
-    public SearchResultEntryCodec getSearchResultEntry()
+    public SearchResultEntry getSearchResultEntry()
     {
-        return (SearchResultEntryCodec)ldapMessage;
+        return ( SearchResultEntry ) message;
     }
 
-    
+
     /**
-     * @return Returns the SearchResultReferenceCodec stored in the container
+     * @return Returns the SearchResultReference stored in the container
      */
-    public SearchResultReferenceCodec getSearchResultReference()
+    public SearchResultReference getSearchResultReference()
     {
-        return (SearchResultReferenceCodec)ldapMessage;
+        return ( SearchResultReference ) message;
     }
 
-    
+
     /**
      * @return Returns the SearchResultDone stored in the container
      */
-    public SearchResultDoneCodec getSearchResultDone()
+    public SearchResultDone getSearchResultDone()
     {
-        return (SearchResultDoneCodec)ldapMessage;
+        return ( SearchResultDone ) message;
     }
 
-    
+
     /**
      * @return Returns the UnbindRequest stored in the container
      */
-    public UnBindRequestCodec getUnbindRequest()
+    public UnbindRequest getUnbindRequest()
     {
-        return (UnBindRequestCodec)ldapMessage;
+        return ( UnbindRequest ) message;
     }
 
-    
+
     /**
-     * Set a ldapMessage Object into the container. It will be completed by the
-     * ldapDecoder .
+     * Set a Message Object into the container. It will be completed by the
+     * ldapDecoder.
      * 
-     * @param ldapMessage The message to set.
+     * @param message The message to set.
      */
-    public void setLdapMessage( LdapMessageCodec ldapMessage )
+    public void setMessage( Message message )
     {
-        this.ldapMessage = ldapMessage;
+        this.message = message;
     }
 
 
@@ -330,7 +323,7 @@ public class LdapMessageContainer extend
     {
         super.clean();
 
-        ldapMessage = null;
+        message = null;
         messageId = 0;
         currentControl = null;
         decodeBytes = 0;
@@ -346,6 +339,7 @@ public class LdapMessageContainer extend
         return binaryAttributeDetector.isBinary( id );
     }
 
+
     /**
      * @return The message ID
      */
@@ -354,6 +348,7 @@ public class LdapMessageContainer extend
         return messageId;
     }
 
+
     /**
      * Set the message ID
      * @param messageId the id of the message
@@ -363,6 +358,7 @@ public class LdapMessageContainer extend
         this.messageId = messageId;
     }
 
+
     /**
      * @return the current control being created
      */
@@ -371,6 +367,7 @@ public class LdapMessageContainer extend
         return currentControl;
     }
 
+
     /**
      * Store a newly created control
      * @param currentControl The control to store



Mime
View raw message