randomClass -> secureRandomClass
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 30 Nov 2010 10:02:33 +0000 (10:02 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 30 Nov 2010 10:02:33 +0000 (10:02 +0000)
Align (and tidy up) mbean descriptor

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1040453 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/session/ManagerBase.java
java/org/apache/catalina/session/mbeans-descriptors.xml

index 236c619..af51a42 100644 (file)
@@ -140,7 +140,7 @@ public abstract class ManagerBase extends LifecycleMBeanBase
      * used when generating session identifiers. The random number generator(s)
      * will always be seeded from a SecureRandom instance.
      */
-    protected String randomClass = "java.security.SecureRandom";
+    protected String secureRandomClass = "java.security.SecureRandom";
 
 
     /**
@@ -515,12 +515,12 @@ public abstract class ManagerBase extends LifecycleMBeanBase
         long t1 = System.currentTimeMillis();
         try {
             // Construct and seed a new random number generator
-            Class<?> clazz = Class.forName(randomClass);
+            Class<?> clazz = Class.forName(secureRandomClass);
             result = (SecureRandom) clazz.newInstance();
         } catch (Exception e) {
             // Fall back to the default case
             log.error(sm.getString("managerBase.random",
-                    randomClass), e);
+                    secureRandomClass), e);
             result = new java.security.SecureRandom();
         }
         byte[] seedBytes = randomSeed.generateSeed(64);
@@ -573,9 +573,9 @@ public abstract class ManagerBase extends LifecycleMBeanBase
     /**
      * Return the random number generator class name.
      */
-    public String getRandomClass() {
+    public String getSecureRandomClass() {
 
-        return (this.randomClass);
+        return (this.secureRandomClass);
 
     }
 
@@ -585,12 +585,12 @@ public abstract class ManagerBase extends LifecycleMBeanBase
      *
      * @param randomClass The new random number generator class name
      */
-    public void setRandomClass(String randomClass) {
+    public void setSecureRandomClass(String randomClass) {
 
-        String oldRandomClass = this.randomClass;
-        this.randomClass = randomClass;
+        String oldRandomClass = this.secureRandomClass;
+        this.secureRandomClass = randomClass;
         support.firePropertyChange("randomClass", oldRandomClass,
-                                   this.randomClass);
+                                   this.secureRandomClass);
 
     }
 
index 6e79220..844b1e1 100644 (file)
           description="Path name of the disk file in which active sessions"
                  type="java.lang.String"/>
 
-    <attribute name="processExpiresFrequency"
-               description="The frequency of the manager checks (expiration and passivation)"
-               type="int"/>
+    <attribute   name="processExpiresFrequency"
+          description="The frequency of the manager checks (expiration and passivation)"
+                 type="int"/>
 
     <attribute   name="processingTime"
           description="Time spent doing housekeeping and expiration"
                  type="long" />
                
+    <attribute   name="secureRandomClass"
+          description="The random number generator class name"
+                 type="java.lang.String"/>
+
     <attribute   name="sessionAverageAliveTime"
           description="Average time an expired session had been alive"
                  type="int"
                  
     <attribute   name="stateName"
           description="The name of the LifecycleState that this component is currently in"
-                 type="java.lang.String"/>
+                 type="java.lang.String"
+            writeable="false"/>
 
     <attribute   name="randomFile"
           description="File source of random - /dev/urandom or a pipe that will be used when the Manager is next started"
                  type="java.lang.String"
             writeable="false"/>
                  
-    <attribute   name="randomClass"
-          description="The random number generator class name"
-                 type="java.lang.String"/>
-
     <attribute   name="rejectedSessions"
           description="Number of sessions we rejected due to maxActive beeing reached"
                  type="int"
             writeable="false"/>
 
     <attribute   name="distributable"
-          description="The distributable flag for Sessions created by this
-                       Manager"
+          description="The distributable flag for Sessions created by this Manager"
                  type="boolean"/>
                  
     <attribute   name="duplicates"
                  type="int"/>
 
     <attribute   name="maxInactiveInterval"
-          description="The default maximum inactive interval for Sessions
-                       created by this Manager"
+          description="The default maximum inactive interval for Sessions created by this Manager"
                  type="int"/>
                  
     <attribute   name="minIdleSwap"
                  type="int"/>
 
     <attribute   name="name"
-          description="The descriptive name of this Manager implementation
-                       (for logging)"
+          description="The descriptive name of this Manager implementation (for logging)"
                  type="java.lang.String"
             writeable="false"/>
 
-    <attribute name="processExpiresFrequency"
-               description="The frequency of the manager checks (expiration and passivation)"
-               type="int"/>
+    <attribute   name="processExpiresFrequency"
+          description="The frequency of the manager checks (expiration and passivation)"
+                 type="int"/>
 
     <attribute   name="processingTime"
           description="Time spent doing housekeeping and expiration"
           description="Indicates whether sessions are saved when the Manager is shut down properly. This requires the unload() method to be called."
                  type="boolean" />
                
+    <attribute   name="secureRandomClass"
+          description="The random number generator class name"
+                 type="java.lang.String"/>
+
     <attribute   name="sessionAverageAliveTime"
           description="Average time an expired session had been alive"
                  type="int"
     <attribute   name="stateName"
           description="The name of the LifecycleState that this component is currently in"
                  type="java.lang.String"
-                 writeable="false"/>
+            writeable="false"/>
 
     <attribute   name="randomFile"
           description="File source of random - /dev/urandom or a pipe"
                  type="java.lang.String"/>
                  
-    <attribute   name="randomClass"
-          description="The random number generator class name"
-                 type="java.lang.String"/>
-
     <attribute   name="rejectedSessions"
           description="Number of sessions we rejected due to maxActive beeing reached"
                  type="int"