directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1064247 - /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ExtendedRequestDecorator.java
Date Thu, 27 Jan 2011 18:33:28 GMT
Author: elecharny
Date: Thu Jan 27 18:33:28 2011
New Revision: 1064247

URL: http://svn.apache.org/viewvc?rev=1064247&view=rev
Log:
Implementing the ExtendedRequest interface

Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ExtendedRequestDecorator.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ExtendedRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ExtendedRequestDecorator.java?rev=1064247&r1=1064246&r2=1064247&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ExtendedRequestDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/ExtendedRequestDecorator.java
Thu Jan 27 18:33:28 2011
@@ -21,6 +21,8 @@ package org.apache.directory.shared.ldap
 
 
 import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
+import org.apache.directory.shared.ldap.model.message.MessageTypeEnum;
+import org.apache.directory.shared.ldap.model.message.ResultResponse;
 
 
 /**
@@ -28,7 +30,7 @@ import org.apache.directory.shared.ldap.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class ExtendedRequestDecorator extends MessageDecorator
+public class ExtendedRequestDecorator extends RequestDecorator implements ExtendedRequest
 {
     /** The extended request length */
     private int extendedRequestLength;
@@ -38,7 +40,7 @@ public class ExtendedRequestDecorator ex
 
 
     /**
-     * Makes a ExtendedRequest encodable.
+     * Makes a ExtendedRequest a MessageDecorator.
      *
      * @param decoratedMessage the decorated ExtendedRequest
      */
@@ -97,4 +99,70 @@ public class ExtendedRequestDecorator ex
     {
         this.requestNameBytes = requestNameBytes;
     }
+
+
+    //-------------------------------------------------------------------------
+    // The ExtendedRequest methods
+    //-------------------------------------------------------------------------
+    /**
+     * {@inheritDoc}
+     */
+    public MessageTypeEnum getResponseType()
+    {
+        return getExtendedRequest().getResponseType();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ResultResponse getResultResponse()
+    {
+        return getExtendedRequest().getResultResponse();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getRequestName()
+    {
+        return getExtendedRequest().getRequestName();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setRequestName( String oid )
+    {
+        getExtendedRequest().setRequestName( oid );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public byte[] getRequestValue()
+    {
+        return getExtendedRequest().getRequestValue();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void setRequestValue( byte[] requestValue )
+    {
+        getExtendedRequest().setRequestValue( requestValue );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String toString()
+    {
+        return getExtendedRequest().toString();
+    }
 }



Mime
View raw message