directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r1064369 - in /directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators: MessageDecorator.java UnbindRequestDecorator.java
Date Fri, 28 Jan 2011 00:04:06 GMT
Author: akarasulu
Date: Fri Jan 28 00:04:06 2011
New Revision: 1064369

URL: http://svn.apache.org/viewvc?rev=1064369&view=rev
Log:
added unbind decorator for completeness

Added:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/UnbindRequestDecorator.java
Modified:
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java?rev=1064369&r1=1064368&r2=1064369&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/MessageDecorator.java
Fri Jan 28 00:04:06 2011
@@ -46,6 +46,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.message.SearchResultDone;
 import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
 import org.apache.directory.shared.ldap.model.message.SearchResultReference;
+import org.apache.directory.shared.ldap.model.message.UnbindRequest;
 
 
 /**
@@ -134,7 +135,7 @@ public class MessageDecorator implements
                 return new SearchResultReferenceDecorator( ( SearchResultReference ) decoratedMessage
);
             
             case UNBIND_REQUEST:
-                return new MessageDecorator( decoratedMessage );
+                return new UnbindRequestDecorator( ( UnbindRequest ) decoratedMessage );
                 
             default:
                 return new MessageDecorator( decoratedMessage );

Added: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/UnbindRequestDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/UnbindRequestDecorator.java?rev=1064369&view=auto
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/UnbindRequestDecorator.java
(added)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/codec/decorators/UnbindRequestDecorator.java
Fri Jan 28 00:04:06 2011
@@ -0,0 +1,53 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.shared.ldap.codec.decorators;
+
+
+import org.apache.directory.shared.ldap.model.message.UnbindRequest;
+
+
+/**
+ * A decorator for the LdapResultResponse message
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class UnbindRequestDecorator extends RequestDecorator implements UnbindRequest
+{
+    /**
+     * Makes Request a MessageDecorator.
+     *
+     * @param decoratedMessage the decorated message
+     */
+    public UnbindRequestDecorator( UnbindRequest decoratedMessage )
+    {
+        super( decoratedMessage );
+    }
+
+    
+    /**
+     * Gets the decorated UnbindRequest.
+     *
+     * @return The decorated {@link UnbindRequest}
+     */
+    public UnbindRequest getUnbindRequest()
+    {
+        return ( UnbindRequest ) getDecoratedMessage();
+    }
+}



Mime
View raw message