directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r161391 - directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/util/pools/PoolEnum.java
Date Fri, 15 Apr 2005 05:33:10 GMT
Author: elecharny
Date: Thu Apr 14 22:33:07 2005
New Revision: 161391

URL: http://svn.apache.org/viewcvs?view=rev&rev=161391
Log:
Added a LdapResultPOJO pool
Changed the Constant incrementation by numeric values

Modified:
    directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/util/pools/PoolEnum.java

Modified: directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/util/pools/PoolEnum.java
URL: http://svn.apache.org/viewcvs/directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/util/pools/PoolEnum.java?view=diff&r1=161390&r2=161391
==============================================================================
--- directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/util/pools/PoolEnum.java
(original)
+++ directory/sandbox/trunk/asn1-new-codec/src/java/org/apache/asn1/util/pools/PoolEnum.java
Thu Apr 14 22:33:07 2005
@@ -21,6 +21,7 @@
 import org.apache.asn1.ldap.pojo.BindRequestPOJO;
 import org.apache.asn1.ldap.pojo.BindResponsePOJO;
 import org.apache.asn1.ldap.pojo.LdapMessagePOJO;
+import org.apache.asn1.ldap.pojo.LdapResultPOJO;
 import org.apache.asn1.ldap.pojo.SaslAuthenticationPOJO;
 import org.apache.asn1.ldap.pojo.SimpleAuthenticationPOJO;
 import org.apache.asn1.util.MutableString;
@@ -42,56 +43,59 @@
     public static int TAG_POOL = 0;
 
     /** Pool of TLVs */
-    public static final int TLV_POOL = TAG_POOL++;
+    public static final int TLV_POOL = 0;
 
     /** Pool of SimpleAuthPOJO objects */
-    public static final int SIMPLE_AUTH_POJO_POOL = TAG_POOL++;
+    public static final int SIMPLE_AUTH_POJO_POOL = 1;
 
     /** Pool of SaslAuthPOJO objects */
-    public static final int SASL_AUTH_POJO_POOL = TAG_POOL++;
+    public static final int SASL_AUTH_POJO_POOL = 2;
 
     /** Pool of BindResponsePOJO objects */
-    public static final int BIND_RESPONSE_POJO_POOL = TAG_POOL++;
+    public static final int BIND_RESPONSE_POJO_POOL = 3;
 
     /** Pool of BindRequestPOJO objects */
-    public static final int BIND_REQUEST_POJO_POOL = TAG_POOL++;
+    public static final int BIND_REQUEST_POJO_POOL = 4;
 
     /** Pool of LdapMessageContainer objects */
-    public static final int LDAP_MESSAGE_CONTAINER_POOL = TAG_POOL++;
+    public static final int LDAP_MESSAGE_CONTAINER_POOL = 5;
 
     /** Pool of LdapMessagePOJO objects */
-    public static final int LDAP_MESSAGE_POJO_POOL = TAG_POOL++;
+    public static final int LDAP_MESSAGE_POJO_POOL = 6;
+
+    /** Pool of Ldap Result POJO */
+    public static final int LDAP_RESULT_POJO_POOL = 7;
 
     /** Pool of 16 chars length Strings */
-    public static final int STRING_POOL_16 = TAG_POOL++;
+    public static final int STRING_POOL_16 = 8;
 
     /** Pool of 32 chars length Strings */
-    public static final int STRING_POOL_32 = TAG_POOL++;
+    public static final int STRING_POOL_32 = 9;
 
     /** Pool of 64 chars length Strings */
-    public static final int STRING_POOL_64 = TAG_POOL++;
+    public static final int STRING_POOL_64 = 10;
 
     /** Pool of 128 chars length Strings */
-    public static final int STRING_POOL_128 = TAG_POOL++;
+    public static final int STRING_POOL_128 = 11;
 
     /** Pool of 256 chars length Strings */
-    public static final int STRING_POOL_256 = TAG_POOL++;
+    public static final int STRING_POOL_256 = 12;
 
     /** Pool of 512 chars length Strings */
-    public static final int STRING_POOL_512 = TAG_POOL++;
+    public static final int STRING_POOL_512 = 13;
 
     /** Pool of 1024 chars length Strings */
-    public static final int STRING_POOL_1024 = TAG_POOL++;
+    public static final int STRING_POOL_1024 = 14;
 
     /** Pool of streamed Strings */
-    public static final int STREAMED_STRING_POOL = TAG_POOL++;
+    public static final int STREAMED_STRING_POOL = 15;
 
     /** To add a new pool type, change the static name.
      * Don't forget to add a String in poolStrings !  */
-    // public static final int <ADDED_POOL> = TAG_POOL++;
+    // public static final int <ADDED_POOL> = <last pool number + 1>;
 
     /** The maximum number of pool we could have */
-    public static final int POOL_NUMBER = TAG_POOL;
+    public static final int POOL_NUMBER = 16;
     
     /** The string representation for debuging purpose */
     private static final String[] poolStrings = new String[]{
@@ -102,6 +106,7 @@
             "BindRequestPOJO",
             "LdapMessageContainer",
             "LdapMessagePOJO",
+            "LdapResultPOJO",
             "String16",
             "String32",
             "String64",
@@ -140,13 +145,14 @@
     {
     	switch (poolId)
 		{
-    		case 0 : return new TLV();
-    		case 1 : return new SimpleAuthenticationPOJO();
-    		case 2 : return new SaslAuthenticationPOJO();
-    		case 3 : return new BindResponsePOJO();
-    		case 4 : return new BindRequestPOJO();
-    		case 5 : return new LdapMessageContainer();
-    		case 6 : return new LdapMessagePOJO();
+    		case TLV_POOL : return new TLV();
+    		case SIMPLE_AUTH_POJO_POOL : return new SimpleAuthenticationPOJO();
+    		case SASL_AUTH_POJO_POOL : return new SaslAuthenticationPOJO();
+    		case BIND_RESPONSE_POJO_POOL : return new BindResponsePOJO();
+    		case BIND_REQUEST_POJO_POOL : return new BindRequestPOJO();
+    		case LDAP_MESSAGE_CONTAINER_POOL : return new LdapMessageContainer();
+    		case LDAP_MESSAGE_POJO_POOL : return new LdapMessagePOJO();
+    		case LDAP_RESULT_POJO_POOL : return new LdapResultPOJO();
     		
     		default : return null;
 		}



Mime
View raw message