directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r441713 - /directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/AbstractMessage.java
Date Sat, 09 Sep 2006 00:58:51 GMT
Author: elecharny
Date: Fri Sep  8 17:58:50 2006
New Revision: 441713

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

Modified:
    directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/AbstractMessage.java

Modified: directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/AbstractMessage.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/AbstractMessage.java?view=diff&rev=441713&r1=441712&r2=441713
==============================================================================
--- directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/AbstractMessage.java
(original)
+++ directory/sandbox/akarasulu/apacheds-2.0/shared/ldap/src/main/java/org/apache/directory/shared/ldap/messages/AbstractMessage.java
Fri Sep  8 17:58:50 2006
@@ -112,4 +112,24 @@
     {
         controls.remove( control.getID() );
     }
+    
+    protected String toString( String protocolOp )
+    {
+        StringBuilder sb = new StringBuilder();
+        
+        sb.append( "LdapMessage : " );
+        sb.append( "LdapMessage\n" );
+        sb.append( "    message Id : " ).append( messageId ).append( '\n' );
+        sb.append( protocolOp );
+        
+        if ( ( controls != null ) && ( controls.size() != 0 ) )
+        {
+            for ( Control control:controls.values() )
+            {
+                sb.append( ((ConcreteControl)control).toString() );
+            }
+        }
+        
+        return sb.toString();
+    }
 }



Mime
View raw message