directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r209124 - in /directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap: codec/grammars/AbandonRequestGrammar.java pojo/AbandonRequest.java
Date Mon, 04 Jul 2005 21:12:25 GMT
Author: elecharny
Date: Mon Jul  4 14:12:23 2005
New Revision: 209124

URL: http://svn.apache.org/viewcvs?rev=209124&view=rev
Log:
Polished the JavaDoc

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

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AbandonRequestGrammar.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AbandonRequestGrammar.java?rev=209124&r1=209123&r2=209124&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AbandonRequestGrammar.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/codec/grammars/AbandonRequestGrammar.java
Mon Jul  4 14:12:23 2005
@@ -65,13 +65,13 @@
 
         statesEnum = LdapStatesEnum.getInstance();
 
-        // We have 4 differents states, so 3 transitions between states.
+        // The transitions table
         super.transitions = new GrammarTransition[LdapStatesEnum.LAST_ABANDON_REQUEST_STATE][256];
 
         //--------------------------------------------------------------------------------------------
         // AbandonRequest Message ID
         //--------------------------------------------------------------------------------------------
-        //  AbandonRequest ::= [APPLICATION 16] MessageID (Tag)
+        // AbandonRequest ::= [APPLICATION 16] MessageID (Tag)
         // The tag must be 0x50. It codes for an integer, as we use
         // IMPLICIT tags (we won't have a 0x02 tag to code the integer).
         // Nothing special to do.
@@ -79,9 +79,9 @@
             new GrammarTransition( LdapStatesEnum.ABANDON_REQUEST_MESSAGE_ID_TAG,
                 LdapStatesEnum.ABANDON_REQUEST_MESSAGE_ID_VALUE, null );
 
-        //  AbandonRequest ::= [APPLICATION 16] MessageID (Value)
-        // Checks that MessageId is in [0 .. 2147483647] and store the value in the AbandonRequest
Object
+        // AbandonRequest ::= [APPLICATION 16] MessageID (Value)
         // (2147483647 = Integer.MAX_VALUE)
+        // Checks that MessageId is in [0 .. 2147483647] and store the value in the AbandonRequest
Object
         // This is the last state.
         super.transitions[LdapStatesEnum.ABANDON_REQUEST_MESSAGE_ID_VALUE][0x50] =
             new GrammarTransition( LdapStatesEnum.ABANDON_REQUEST_MESSAGE_ID_VALUE,
@@ -92,7 +92,7 @@
 
                         LdapMessageContainer ldapMessageContainer = ( LdapMessageContainer
)
                             container;
-                        LdapMessage      ldapMessage          =
+                        LdapMessage          ldapMessage          =
                             ldapMessageContainer.getLdapMessage();
 
                         // The current TLV should be a integer
@@ -111,8 +111,8 @@
                         else
                         {
 
-                            // Ok, the Message ID is correct. We have to allocate an
-                            // abandonRequest Object to store the value, and store the
+                            // Ok, the Message ID is correct. We have to store it
+                            // in the AbandonRequest object
                             // Object in the LDAPMessage
                             AbandonRequest abandonRequest = new AbandonRequest();
                             abandonRequest.setMessageId( messageId );

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java?rev=209124&r1=209123&r2=209124&view=diff
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/ldap/pojo/AbandonRequest.java
Mon Jul  4 14:12:23 2005
@@ -27,8 +27,10 @@
 public class AbandonRequest extends LdapMessage
 {
     //~ Instance fields ----------------------------------------------------------------------------
-    private int messageID;
-    
+
+    /** The abandonned message ID  */
+    private int messageId;
+
     //~ Constructors -------------------------------------------------------------------------------
 
     /**
@@ -38,18 +40,42 @@
     {
         super( );
     }
-    
+
+    //~ Methods ------------------------------------------------------------------------------------
+
     /**
-     * @return Returns the messageID.
+     * Get the abandonned message ID
+     *
+     * @return Returns the MessageId.
      */
-    public int getMessageID() {
-        return messageID;
+    public int getMessageId()
+    {
+        return messageId;
     }
-    
+
     /**
-     * @param messageID The messageID to set.
+     * Set the abandonned message ID
+     *
+     * @param messageId The messageID to set.
      */
-    public void setMessageID(int messageID) {
-        this.messageID = messageID;
+    public void setMessageId( int messageId )
+    {
+        this.messageId = messageId;
+    }
+
+    /**
+     * Return a String representing an AbandonRequest
+     * 
+     * @return A String representing the AbandonRequest
+    */
+    public String toString()
+    {
+
+        StringBuffer sb = new StringBuffer();
+
+        sb.append( "    Abandon Request :\n" );
+        sb.append( "        Message Id : " ).append( messageId ).append( '\n' );
+
+        return sb.toString();
     }
 }



Mime
View raw message