directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r209329 - /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindResponse.java
Date Tue, 05 Jul 2005 22:01:37 GMT
Author: elecharny
Date: Tue Jul  5 15:01:35 2005
New Revision: 209329

URL: http://svn.apache.org/viewcvs?rev=209329&view=rev
Log:
Added a toString() method

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindResponse.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindResponse.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindResponse.java?rev=209329&r1=209328&r2=209329&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindResponse.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/BindResponse.java
Tue Jul  5 15:01:35 2005
@@ -20,7 +20,10 @@
 
 /**
  * A BindResponse Message. Its syntax is :
- *   BindResponse ::= messageId LdapResult [serverSaslCreds]
+ *   BindResponse ::= [APPLICATION 1] SEQUENCE {
+ *       COMPONENTS OF LDAPResult,
+ *       serverSaslCreds    [7] OCTET STRING OPTIONAL }
+ * 
  *   LdapResult ::= resultCode matchedDN errorMessage (referrals)*
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -59,5 +62,25 @@
     public void setServerSaslCreds( OctetString serverSaslCreds )
     {
         this.serverSaslCreds = serverSaslCreds;
+    }
+
+    /**
+     * Get a String representation of a BindResponse
+     *
+     * @return A BindResponse String 
+     */
+    public String toString()
+    {
+        StringBuffer sb = new StringBuffer();
+
+        sb.append( "    BindResponse\n" );
+        sb.append( super.toString() );
+        
+        if ( serverSaslCreds != null )
+        {
+            sb.append( "        Server sasl credentials : '" ).append( serverSaslCreds.toString()
).append( "'\n" );
+        }
+
+        return sb.toString();
     }
 }



Mime
View raw message