harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r432880 - in /incubator/harmony/enhanced/classlib/trunk: depends/files/ make/ modules/lang-management/ modules/lang-management/.settings/ modules/lang-management/META-INF/ modules/lang-management/make/ modules/lang-management/src/ modules/l...
Date Sat, 19 Aug 2006 21:19:34 GMT
Author: ndbeyer
Date: Sat Aug 19 14:19:31 2006
New Revision: 432880

URL: http://svn.apache.org/viewvc?rev=432880&view=rev
Log:
Create lang-management module and check in initial class stubs, interfaces and implementations.

Added:
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.classpath   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.project   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/org.eclipse.jdt.core.prefs
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/org.eclipse.jdt.ui.prefs
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/META-INF/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/META-INF/MANIFEST.MF
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/build.xml   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/hyproperties.xml   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/patternset.txt   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ClassLoadingMXBean.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/CompilationMXBean.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/GarbageCollectorMXBean.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementPermission.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryMXBean.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryManagerMXBean.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryPoolMXBean.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryType.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/OperatingSystemMXBean.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/RuntimeMXBean.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadMXBean.java   (with props)
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/tests/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/tests/java/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/tests/java/lang/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/tests/java/lang/management/
    incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/tests/java/lang/management/ManagementPermissionTest.java   (with props)
Modified:
    incubator/harmony/enhanced/classlib/trunk/depends/files/bootclasspath.properties
    incubator/harmony/enhanced/classlib/trunk/make/build-java.xml

Modified: incubator/harmony/enhanced/classlib/trunk/depends/files/bootclasspath.properties
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/depends/files/bootclasspath.properties?rev=432880&r1=432879&r2=432880&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/depends/files/bootclasspath.properties (original)
+++ incubator/harmony/enhanced/classlib/trunk/depends/files/bootclasspath.properties Sat Aug 19 14:19:31 2006
@@ -86,8 +86,8 @@
 bootclasspath.source.11=jndi-src.jar
 bootclasspath.source.packageroot.11=/
 
-bootclasspath.12=lang_mgt.jar
-bootclasspath.source.12=lang_mgt-src.jar
+bootclasspath.12=lang-management.jar
+bootclasspath.source.12=lang-management-src.jar
 bootclasspath.source.packageroot.12=/
 
 bootclasspath.13=logging.jar

Modified: incubator/harmony/enhanced/classlib/trunk/make/build-java.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/make/build-java.xml?rev=432880&r1=432879&r2=432880&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/build-java.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/build-java.xml Sat Aug 19 14:19:31 2006
@@ -128,6 +128,7 @@
             <src path="modules/swing/src/main/java/common" />
             <src path="modules/text/src/main/java" />
             <src path="modules/x-net/src/main/java/" />
+            <src path="modules/lang-management/src/main/java/" />
 
             <classpath location="${build.output}" />
             <classpath>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sat Aug 19 14:19:31 2006
@@ -0,0 +1 @@
+bin

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.classpath
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.classpath?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.classpath (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.classpath Sat Aug 19 14:19:31 2006
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+    <classpathentry output="bin/main" kind="src" path="src/main/java"/>
+    <classpathentry output="bin/test" kind="src" path="src/test/java"/>
+    <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+    <classpathentry sourcepath="JUNIT_SRC_HOME/junitsrc.zip" kind="var" path="JUNIT_HOME/junit.jar"/>
+    <classpathentry kind="output" path="bin"/>
+</classpath>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.classpath
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.project
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.project?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.project (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.project Sat Aug 19 14:19:31 2006
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+    <name>lang-management</name>
+    <comment></comment>
+    <projects>
+    </projects>
+    <buildSpec>
+        <buildCommand>
+            <name>org.eclipse.jdt.core.javabuilder</name>
+            <arguments>
+            </arguments>
+        </buildCommand>
+        <buildCommand>
+            <name>org.eclipse.pde.ManifestBuilder</name>
+            <arguments>
+            </arguments>
+        </buildCommand>
+        <buildCommand>
+            <name>org.eclipse.pde.SchemaBuilder</name>
+            <arguments>
+            </arguments>
+        </buildCommand>
+    </buildSpec>
+    <natures>
+        <nature>org.eclipse.pde.PluginNature</nature>
+        <nature>org.eclipse.jdt.core.javanature</nature>
+    </natures>
+</projectDescription>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.project
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/org.eclipse.jdt.core.prefs?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/org.eclipse.jdt.core.prefs (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/org.eclipse.jdt.core.prefs Sat Aug 19 14:19:31 2006
@@ -0,0 +1,12 @@
+#Sat Aug 19 00:12:25 CDT 2006
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/org.eclipse.jdt.ui.prefs
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/org.eclipse.jdt.ui.prefs?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/org.eclipse.jdt.ui.prefs (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/.settings/org.eclipse.jdt.ui.prefs Sat Aug 19 14:19:31 2006
@@ -0,0 +1,3 @@
+#Sat Aug 19 00:12:24 CDT 2006
+eclipse.preferences.version=1
+internal.default.compliance=default

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/META-INF/MANIFEST.MF
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/META-INF/MANIFEST.MF?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/META-INF/MANIFEST.MF (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/META-INF/MANIFEST.MF Sat Aug 19 14:19:31 2006
@@ -0,0 +1,16 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Harmony Lang-Management
+Bundle-SymbolicName: org.apache.harmony.langmanagement
+Bundle-Version: 1.0.0
+Bundle-ClassPath: .
+Eclipse-JREBundle: true
+Import-Package: java.lang,
+ java.lang.reflect,
+ java.security,
+ java.util,
+ javax.management,
+ javax.management.modelmbean,
+ javax.management.openmbean
+Export-Package: java.lang.management,
+ org.apache.harmony.langmanagement.tests.java.lang.management

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/build.xml?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/build.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/build.xml Sat Aug 19 14:19:31 2006
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its
+    licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<project name="LANG-MANAGEMENT Build" default="build" basedir=".">
+    <description>Build for LANG-MANAGEMENT component</description>
+
+    <!-- import common properties -->
+    <import file="${basedir}/../../make/properties.xml" />
+
+    <!-- set global properties for this build. -->
+    <xmlproperty file="make/hyproperties.xml" semanticAttributes="true" />
+
+    <fileset id="classes" dir="${hy.build}">
+        <includesfile name="${hy.lang-management}/make/patternset.txt" />
+        <excludesfile name="${hy.hdk}/build/patternsets/luni-kernel.txt" />
+        <excludesfile name="${hy.hdk}/build/patternsets/security-kernel.txt" />
+    </fileset>
+
+    <!-- Set build.compiler to "org.eclipse.jdt.core.JDTCompilerAdapter" to
+         use the Eclipse Java compiler. -->
+    <property name="build.compiler" value="modern" />
+
+    <target name="build" depends="compile.java, build.jar" />
+
+    <target name="test" depends="build, compile.tests, run.tests" />
+
+    <target name="clean">
+        <delete failonerror="false">
+            <fileset refid="classes" />
+            <fileset dir="${hy.lang-management.bin.test}" />
+        </delete>
+    </target>
+
+    <target name="compile.java">
+        <echo message="Compiling LANG-MANAGEMENT classes" />
+
+        <mkdir dir="${hy.build}" />
+
+        <javac sourcepath=""
+               srcdir="${hy.lang-management.src.main.java}"
+               destdir="${hy.build}"
+               source="${hy.javac.source}"
+               target="${hy.javac.target}"
+               debug="${hy.javac.debug}">
+
+            <bootclasspath>
+                <fileset dir="${hy.jdk}/jre/lib/boot">
+                    <include name="**/*.jar" />
+                </fileset>
+            </bootclasspath>
+        </javac>
+    </target>
+
+    <target name="build.jar" depends="svn-info">
+        <jar destfile="${hy.jdk}/jre/lib/boot/${hy.lang-management.packaging.jarname}.jar"
+             manifest="${hy.lang-management}/META-INF/MANIFEST.MF">
+            <fileset refid="classes" />
+            <manifest>
+                <attribute name="Implementation-Version" value="${svn.info}"/> 
+            </manifest>
+        </jar>
+    </target>
+
+    <target name="compile.tests">
+        <echo message="Compiling LANG-MANAGEMENT tests" />
+
+        <mkdir dir="${hy.lang-management.bin.test}" />
+
+        <javac srcdir="${hy.lang-management.src.test.java}"
+               destdir="${hy.lang-management.bin.test}"
+               sourcepath=""
+               source="${hy.javac.source}"
+               target="${hy.javac.target}"
+               debug="${hy.javac.debug}">
+
+            <bootclasspath>
+                <fileset dir="${hy.jdk}/jre/lib/boot">
+                    <include name="**/*.jar" />
+                </fileset>
+            </bootclasspath>
+            <classpath location="../../build/tests" />
+            <classpath location="${hy.hdk}/build/test/support.jar" />
+        </javac>
+    </target>
+
+    <target name="run.tests">
+
+        <mkdir dir="${hy.tests.reports}" />
+
+        <property name="test.jre.home" value="${hy.jdk}/jre" />
+
+        <junit fork="yes"
+               forkmode="once"
+               printsummary="withOutAndErr"
+               errorproperty="test.errors"
+               failureproperty="test.failures"
+               showoutput="on"
+               dir="${hy.lang-management.bin.test}"
+               jvm="${test.jre.home}/bin/java">
+
+            <jvmarg value="-showversion"/>
+
+            <env key="JAVA_HOME" value="${test.jre.home}"/>
+
+            <classpath>
+                <pathelement path="${hy.lang-management.bin.test}"/>
+            </classpath>
+            <classpath location="${hy.hdk}/build/test/support.jar" />
+
+            <formatter type="xml" />
+
+            <test name="${test.case}" todir="${hy.tests.reports}"
+                 if="test.case" />
+
+            <batchtest todir="${hy.tests.reports}" haltonfailure="no"
+                unless="test.case">
+
+                <fileset dir="${hy.lang-management.src.test.java}"/>
+            </batchtest>
+        </junit>
+        <antcall target="touch-failures-file" />
+        <antcall target="touch-errors-file" />
+    </target>
+
+    <target name="touch-failures-file" if="test.failures">
+        <echo file="${hy.tests.reports}/test.failures"
+            append="true">lang-management${line.separator}</echo>
+    </target>
+
+    <target name="touch-errors-file" if="test.errors">
+        <echo file="${hy.tests.reports}/test.errors"
+            append="true">lang-management${line.separator}</echo>
+    </target>
+
+</project>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/hyproperties.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/hyproperties.xml?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/hyproperties.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/hyproperties.xml Sat Aug 19 14:19:31 2006
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+
+<hy>
+   <lang-management location=".">
+      <src>
+         <main>
+            <java location="src/main/java" />
+            <resources location="src/main/resources" />
+         </main>
+         <test>
+            <java location="src/test/java" />
+            <resources location="src/test/resources" />
+         </test>
+      </src>
+      <bin>
+        <main location="bin/main" />
+        <test location="bin/test" />
+      </bin>
+      <packaging>
+        <jarname>lang-management</jarname>
+      </packaging>
+   </lang-management>
+
+   <hdk location="../../deploy" />
+   <jdk location="../../deploy/jdk" />
+   <build location="../../build/classes" />
+
+   <tests>
+      <reports location="../../build/test_report" />
+   </tests>
+</hy>

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/hyproperties.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/patternset.txt
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/patternset.txt?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/patternset.txt (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/patternset.txt Sat Aug 19 14:19:31 2006
@@ -0,0 +1,15 @@
+# Copyright 2006 The Apache Software Foundation or its licensors, as applicable
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#     http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+ 
+java/lang/management/*

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/make/patternset.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ClassLoadingMXBean.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ClassLoadingMXBean.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ClassLoadingMXBean.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ClassLoadingMXBean.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,62 @@
+package java.lang.management;
+
+/**
+ * <p>
+ * The management interface for the class loading system.
+ * </p>
+ * <p>
+ * <code>ObjectName</code>: java.lang:type=ClassLoading
+ * </p>
+ * 
+ * @since 1.5
+ */
+public interface ClassLoadingMXBean {
+    /**
+     * <p>
+     * The number of classes currently loaded in the JVM.
+     * </p>
+     * 
+     * @return The number of loaded classes.
+     */
+    int getLoadedClassCount();
+
+    /**
+     * <p>
+     * The total number of classes the JVM has loaded since startup.
+     * </p>
+     * 
+     * @return The total number of classes loaded.
+     */
+    long getTotalLoadedClassCount();
+
+    /**
+     * <p>
+     * The number of classes that have been unloaded in the JVM since startup.
+     * </p>
+     * 
+     * @return The number of classes unloaded.
+     */
+    long getUnloadedClassCount();
+
+    /**
+     * <p>
+     * Indicates whether or not the verbose output is enabled for the class
+     * loading system.
+     * </p>
+     * 
+     * @return <code>true</code> is verbose output is enabled, otherwise <code>false</code>.
+     */
+    boolean isVerbose();
+
+    /**
+     * <p>
+     * Enables or disables the verbose output of the class loading system.
+     * </p>
+     * 
+     * @param value <code>true</code> to enable, <code>false</code> to
+     *        disable.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("control")</code>.
+     */
+    void setVerbose(boolean value);
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ClassLoadingMXBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/CompilationMXBean.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/CompilationMXBean.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/CompilationMXBean.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/CompilationMXBean.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,42 @@
+package java.lang.management;
+
+/**
+ * <p>
+ * The management interface for the compilation system.
+ * </p>
+ * <p>
+ * <code>ObjectName</code>: java.lang:type=Compilation
+ * </p>
+ * 
+ * @since 1.5
+ */
+public interface CompilationMXBean {
+    /**
+     * <p>
+     * The name of the compilation system.
+     * </p>
+     * 
+     * @return The compiler's name.
+     */
+    String getName();
+
+    /**
+     * <p>
+     * The approximate, cumulative time (in milliseconds) spent performing
+     * compilation.
+     * </p>
+     * 
+     * @return The total time spent compiling.
+     * @throws UnsupportedOperationException if this is not supported.
+     */
+    long getTotalCompilationTime();
+
+    /**
+     * <p>
+     * Indicates whether or not the JVM supports compilation time monitoring.
+     * </p>
+     * 
+     * @return <code>true</code> if supported, otherwise <code>false</code>.
+     */
+    boolean isCompilationTimeMonitoringSupported();
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/CompilationMXBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/GarbageCollectorMXBean.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/GarbageCollectorMXBean.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/GarbageCollectorMXBean.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/GarbageCollectorMXBean.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,34 @@
+package java.lang.management;
+
+/**
+ * <p>
+ * The management interface for the garbage collector system.
+ * </p>
+ * <p>
+ * <code>ObjectName</code> pattern: java.lang:type=GarbageCollector,name=<i>collector_name</i>
+ * </p>
+ * 
+ * @since 1.5
+ */
+public interface GarbageCollectorMXBean extends MemoryManagerMXBean {
+    /**
+     * <p>
+     * The number of collections that have been executed by this collector. A
+     * value of <code>-1</code> means that collection counts are undefined for
+     * this collector.
+     * </p>
+     * 
+     * @return The number of collections executed.
+     */
+    long getCollectionCount();
+
+    /**
+     * <p>
+     * The approximate, cumulative time (in milliseconds) spent executing
+     * collections for this collector.
+     * </p>
+     * 
+     * @return The time spent collecting garbage.
+     */
+    long getCollectionTime();
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/GarbageCollectorMXBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,132 @@
+package java.lang.management;
+
+import java.util.Collections;
+import java.util.List;
+
+import javax.management.MBeanServer;
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+
+/**
+ * <p>
+ * The factory for retrieving all managed object for the JVM as well as the
+ * JVM's MBean server.
+ * </p>
+ * 
+ * @since 1.5
+ */
+public class ManagementFactory {
+    /**
+     * <p>
+     * The String value of the {@link ObjectName} for {@link ClassLoadingMXBean}.
+     * </p>
+     */
+    public static final String CLASS_LOADING_MXBEAN_NAME = "java.lang:type=ClassLoading";
+
+    /**
+     * <p>
+     * The String value of the {@link ObjectName} for {@link CompilationMXBean}.
+     * </p>
+     */
+    public static final String COMPILATION_MXBEAN_NAME = "java.lang:type=Compilation";
+
+    /**
+     * <p>
+     * The String value of the {@link ObjectName} for
+     * {@link GarbageCollectorMXBean}.
+     * </p>
+     */
+    public static final String GARBAGE_COLLECTOR_MXBEAN_DOMAIN_TYPE = "java.lang:type=GarbageCollector";
+
+    /**
+     * <p>
+     * The String value of the {@link ObjectName} for
+     * {@link MemoryManagerMXBean}.
+     * </p>
+     */
+    public static final String MEMORY_MANAGER_MXBEAN_DOMAIN_TYPE = "java.lang:type=MemoryManager";
+
+    /**
+     * <p>
+     * The String value of the {@link ObjectName} for {@link MemoryMXBean}.
+     * </p>
+     */
+    public static final String MEMORY_MXBEAN_NAME = "java.lang:type=Memory";
+
+    /**
+     * <p>
+     * The String value of the {@link ObjectName} for {@link MemoryPoolMXBean}.
+     * </p>
+     */
+    public static final String MEMORY_POOL_MXBEAN_DOMAIN_TYPE = "java.lang:type=MemoryPool";
+
+    /**
+     * <p>
+     * The String value of the {@link ObjectName} for
+     * {@link OperatingSystemMXBean}.
+     * </p>
+     */
+    public static final String OPERATING_SYSTEM_MXBEAN_NAME = "java.lang:type=OperatingSystem";
+
+    /**
+     * <p>
+     * The String value of the {@link ObjectName} for {@link RuntimeMXBean}.
+     * </p>
+     */
+    public static final String RUNTIME_MXBEAN_NAME = "java.lang:type=Runtime";
+
+    /**
+     * <p>
+     * The String value of the {@link ObjectName} for {@link ThreadMXBean}.
+     * </p>
+     */
+    public static final String THREAD_MXBEAN_NAME = "java.lang:type=Threading";
+
+    public static ClassLoadingMXBean getClassLoadingMXBean() {
+        return null;
+    }
+
+    public static CompilationMXBean getCompilationMXBean() {
+        return null;
+    }
+
+    public static List<GarbageCollectorMXBean> getGarbageCollectorMXBeans() {
+        return Collections.emptyList();
+    }
+
+    public static List<MemoryManagerMXBean> getMemoryManagerMXBeans() {
+        return Collections.emptyList();
+    }
+
+    public static MemoryMXBean getMemoryMXBean() {
+        return null;
+    }
+
+    public static List<MemoryPoolMXBean> getMemoryPoolMXBeans() {
+        return null;
+    }
+
+    public static OperatingSystemMXBean getOperatingSystemMXBean() {
+        return null;
+    }
+
+    public static MBeanServer getPlatformMBeanServer() {
+        return null;
+    }
+
+    public static RuntimeMXBean getRuntimeMXBean() {
+        return null;
+    }
+
+    public static ThreadMXBean getThreadMXBean() {
+        return null;
+    }
+
+    public static <T> T newPlatformMXBeanProxy(MBeanServerConnection connection,
+            String mxbeanName, Class<T> mxbeanInterface) {
+        return null;
+    }
+
+    private ManagementFactory() {
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementPermission.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementPermission.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementPermission.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementPermission.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,52 @@
+package java.lang.management;
+
+import java.security.BasicPermission;
+import java.security.SecurityPermission;
+
+/**
+ * <p>
+ * A {@link SecurityPermission} for use with the management system.
+ * </p>
+ * 
+ * @since 1.5
+ */
+public class ManagementPermission extends BasicPermission {
+    private static final long serialVersionUID = 1897496590799378737L;
+
+    /**
+     * <p>
+     * Constructs and instance with the given name.
+     * </p>
+     * 
+     * @param name The permission name, which must be <code>"monitor"</code>
+     *        or <code>"control"</code>.
+     * @throws IllegalArgumentException if <code>name</code> is invalid.
+     */
+    public ManagementPermission(String name) {
+        super(name);
+        if (!"control".equals(name) && !"monitor".equals(name)) {
+            throw new IllegalArgumentException();
+        }
+    }
+
+    /**
+     * <p>
+     * Constructs and instance with the given name.
+     * </p>
+     * 
+     * @param name The permission name, which must be <code>"monitor"</code>
+     *        or <code>"control"</code>.
+     * @param actions This is not used, so it must be <code>null</code> or
+     *        empty.
+     * @throws IllegalArgumentException if <code>name</code> is invalid.
+     */
+    public ManagementPermission(String name, String actions) {
+        super(name, actions);
+        if (!"control".equals(name) && !"monitor".equals(name)) {
+            throw new IllegalArgumentException();
+        }
+        if (actions != null && actions.length() != 0) {
+            throw new IllegalArgumentException();
+        }
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ManagementPermission.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryMXBean.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryMXBean.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryMXBean.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryMXBean.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,70 @@
+package java.lang.management;
+
+/**
+ * <p>
+ * The management interface for the memory system.
+ * </p>
+ * <p>
+ * <code>ObjectName</code>: java.lang:type=Memory
+ * </p>
+ * 
+ * @since 1.5
+ */
+public interface MemoryMXBean {
+    /**
+     * <p>
+     * Invokes the JVM's garbage collector; equivalent to {@link System#gc()}.
+     * </p>
+     */
+    void gc();
+
+    /**
+     * <p>
+     * The current memory usage for the heap; memory used for object allocation.
+     * </p>
+     * 
+     * @return A {@link MemoryUsage} instance representing heap memory.
+     */
+    MemoryUsage getHeapMemoryUsage();
+
+    /**
+     * <p>
+     * The current memory usage outside of the heap.
+     * </p>
+     * 
+     * @return A {@link MemoryUsage} instance representing non-heap memory.
+     */
+    MemoryUsage getNonHeapMemoryUsage();
+
+    /**
+     * <p>
+     * The approximate number of objects that are about to be finalized.
+     * </p>
+     * 
+     * @return The number of objects about to be finalized.
+     */
+    int getObjectPendingFinalizationCount();
+
+    /**
+     * <p>
+     * Indicates whether or not the verbose output is enabled for the memory
+     * system.
+     * </p>
+     * 
+     * @return <code>true</code> is verbose output is enabled, otherwise
+     *         <code>false</code>.
+     */
+    boolean isVerbose();
+
+    /**
+     * <p>
+     * Enables or disables the verbose output of the memory system.
+     * </p>
+     * 
+     * @param value <code>true</code> to enable, <code>false</code> to
+     *        disable.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("control")</code>.
+     */
+    void setVerbose(boolean value);
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryMXBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryManagerMXBean.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryManagerMXBean.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryManagerMXBean.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryManagerMXBean.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,42 @@
+package java.lang.management;
+
+/**
+ * <p>
+ * The management interface for a memory manager system.
+ * </p>
+ * <p>
+ * <code>ObjectName</code> pattern: java.lang:type=MemoryManager,name=<i>manager_name</i>
+ * </p>
+ * 
+ * @since 1.5
+ */
+public interface MemoryManagerMXBean {
+    /**
+     * <p>
+     * The names of the memory pools being managed by this manager.
+     * </p>
+     * 
+     * @return A <code>String[]</code> of pool names.
+     */
+    String[] getMemoryPoolNames();
+
+    /**
+     * <p>
+     * The name of the memory manager.
+     * </p>
+     * 
+     * @return The manager's name.
+     */
+    String getName();
+
+    /**
+     * <p>
+     * Indicates whether or not the manager is currently valid. A memory manager
+     * may be removed by a JVM and become invalid.
+     * </p>
+     * 
+     * @return <code>true</code> if the manager is valid, <code>false</code>
+     *         otherwise.
+     */
+    boolean isValid();
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryManagerMXBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,67 @@
+package java.lang.management;
+
+import javax.management.openmbean.CompositeData;
+
+/**
+ * <p>
+ * Memory notification information.
+ * </p>
+ * 
+ * @since 1.5
+ */
+public class MemoryNotificationInfo {
+    public static final String MEMORY_COLLECTION_THRESHOLD_EXCEEDED = "java.management.memory.collection.threshold.exceeded";
+
+    public static final String MEMORY_THRESHOLD_EXCEEDED = "java.management.memory.threshold.exceeded";
+
+    /**
+     * <p>
+     * Constructs a MemoryNotificationInfo object from the CompositeData passed.
+     * </p>
+     * 
+     * @param cd The CompositeDate object to retrieve data from.
+     * @return A MemoryNotificationInfo instance.
+     * @throws IllegalArgumentException if <code>cd</code> does not contain
+     *         MemoryUsage data.
+     */
+    public static MemoryNotificationInfo from(CompositeData cd) {
+        String poolName = (String) cd.get("poolName");
+        MemoryUsage usage = MemoryUsage.from((CompositeData) cd.get("usage"));
+        long count = ((Long) cd.get("count")).longValue();
+        return new MemoryNotificationInfo(poolName, usage, count);
+    }
+
+    private final String poolName;
+
+    private final MemoryUsage usage;
+
+    private final long count;
+
+    /**
+     * <p>
+     * Constructs a MemoryNotificationInfo instance.
+     * </p>
+     * 
+     * @param poolName The memory pool name.
+     * @param usage The memory usage snapshot.
+     * @param count The threshold crossing count.
+     */
+    public MemoryNotificationInfo(String poolName, MemoryUsage usage, long count) {
+        super();
+        this.poolName = poolName;
+        this.usage = usage;
+        this.count = count;
+    }
+
+    public String getPoolName() {
+        return poolName;
+    }
+
+    public MemoryUsage getUsage() {
+        return usage;
+    }
+
+    public long getCount() {
+        return count;
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryNotificationInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryPoolMXBean.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryPoolMXBean.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryPoolMXBean.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryPoolMXBean.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,219 @@
+package java.lang.management;
+
+/**
+ * <p>
+ * The management interface for a memory pool.
+ * </p>
+ * <p>
+ * <code>ObjectName</code> pattern: java.lang:type=MemoryPool,name=<i>pool_name</i>
+ * </p>
+ * 
+ * @since 1.5
+ */
+public interface MemoryPoolMXBean {
+    /**
+     * <p>
+     * The memory usage of the JVM's most recent attempt to recycle unused
+     * objects in this pool. If this feature is not supported, then
+     * <code>null</code> will be returned.
+     * </p>
+     * 
+     * @return A {@link MemoryUsage} instance representing the most recent
+     *         attempt to recycle unused objects; <code>null</code> may be
+     *         returned to indicated this method is not supported.
+     */
+    MemoryUsage getCollectionUsage();
+
+    /**
+     * <p>
+     * The collection usage threshold (in bytes) of this pool; the default is
+     * zero.
+     * </p>
+     * 
+     * @return The collection usage threshold value.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @see #isCollectionUsageThresholdSupported()
+     */
+    long getCollectionUsageThreshold();
+
+    /**
+     * <p>
+     * The number of times the collection usage threshold has been reached or
+     * exceeded.
+     * </p>
+     * 
+     * @return The number of times the collection usage threshold has been
+     *         reached or exceeded.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @see #isCollectionUsageThresholdSupported()
+     */
+    long getCollectionUsageThresholdCount();
+
+    /**
+     * <p>
+     * The names of the memory managers that manage this pool; there will be at
+     * least one memory manager for each pool.
+     * </p>
+     * 
+     * @return A <code>String[]</code> of memory manager names.
+     */
+    String[] getMemoryManagerNames();
+
+    /**
+     * <p>
+     * The name of this memory pool.
+     * </p>
+     * 
+     * @return The name of this memory pool.
+     */
+    String getName();
+
+    /**
+     * <p>
+     * The peak memory usage of this pool since JVM startup or since the last
+     * reset of the peak.
+     * </p>
+     * 
+     * @return A {@link MemoryUsage} instance representing the peak usage.
+     * @see #resetPeakUsage()
+     */
+    MemoryUsage getPeakUsage();
+
+    /**
+     * <p>
+     * The memory type of this pool.
+     * </p>
+     * 
+     * @return The pool's memory type.
+     */
+    MemoryType getType();
+
+    /**
+     * <p>
+     * The approximate, current memory usage of this pool. This method will
+     * return <code>null</code> if the pool is invalid.
+     * </p>
+     * 
+     * @return A {@link MemoryUsage} instance representing the current usage or
+     *         <code>null</code> if the pool is invalid.
+     */
+    MemoryUsage getUsage();
+
+    /**
+     * <p>
+     * The current usage threshold (in bytes) of this pool.
+     * </p>
+     * 
+     * @return The current usage threshold.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @see #isUsageThresholdSupported()
+     */
+    long getUsageThreshold();
+
+    /**
+     * <p>
+     * The number of times the usage threshold has been met or exceeded.
+     * </p>
+     * 
+     * @return The number of times the usage threshold has been met or exceeded.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @see #isUsageThresholdSupported()
+     */
+    long getUsageThresholdCount();
+
+    /**
+     * <p>
+     * Indicates whether or not the collection usage threshold has been met or
+     * exceeded after the most recent collection.
+     * </p>
+     * 
+     * @return <code>true</code> if the collection usage threshold was met or
+     *         exceeded, otherwise <code>false</code>.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @see #isCollectionUsageThresholdSupported()
+     */
+    boolean isCollectionUsageThresholdExceeded();
+
+    /**
+     * <p>
+     * Indicates whether or not this pool supports collection threshold
+     * monitoring.
+     * </p>
+     * 
+     * @return <code>true</code> if supported, <code>false</code> otherwise.
+     */
+    boolean isCollectionUsageThresholdSupported();
+
+    /**
+     * <p>
+     * Indicates whether or not the usage threshold is currently met or
+     * exceeded.
+     * </p>
+     * 
+     * @return <code>true</code> if the usage threshold is met or exceeded,
+     *         otherwise <code>false</code>.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @see #isUsageThresholdSupported()
+     */
+    boolean isUsageThresholdExceeded();
+
+    /**
+     * <p>
+     * Indicates whether or not usage threshold monitoring is supported.
+     * </p>
+     * 
+     * @return <code>true</code> if supported, otherwise <code>false</code>.
+     */
+    boolean isUsageThresholdSupported();
+
+    /**
+     * <p>
+     * Indicates whether or not the pool is currently valid. A memory pool may
+     * be removed by a JVM and become invalid.
+     * </p>
+     * 
+     * @return <code>true</code> if the pool is valid, <code>false</code>
+     *         otherwise.
+     */
+    boolean isValid();
+
+    /**
+     * <p>
+     * Resets the peak memory usage to the current value.
+     * </p>
+     * 
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("control")</code>.
+     */
+    void resetPeakUsage();
+
+    /**
+     * <p>
+     * Sets the collection usage threshold (in bytes) for this memory pool.
+     * </p>
+     * 
+     * @param threshold The new, non-negative threshold.
+     * @throws IllegalArgumentException if <code>threshold</code> is negative
+     *         or greater than the maximum amount supported by this pool, if
+     *         defined.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("control")</code>.
+     */
+    void setCollectionUsageThreshold(long threshold);
+
+    /**
+     * <p>
+     * Sets the usage threshold (in bytes) for this memory pool.
+     * </p>
+     * 
+     * @param threshold The new, non-negative threshold.
+     * @throws IllegalArgumentException if <code>threshold</code> is negative
+     *         or greater than the maximum amount supported by this pool, if
+     *         defined.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("control")</code>.
+     */
+    void setUsageThreshold(long threshold);
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryPoolMXBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryType.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryType.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryType.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryType.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,23 @@
+package java.lang.management;
+
+/**
+ * <p>
+ * Types of memory pools.
+ * </p>
+ * 
+ * @since 1.5
+ */
+public enum MemoryType {
+    /**
+     * <p>
+     * Heap memory type.
+     * </p>
+     */
+    HEAP,
+    /**
+     * <p>
+     * Non-heap memory type.
+     * </p>
+     */
+    NON_HEAP
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,95 @@
+package java.lang.management;
+
+import javax.management.openmbean.CompositeData;
+
+/**
+ * <p>
+ * A memory usage snapshot.
+ * </p>
+ * 
+ * @since 1.5
+ */
+public class MemoryUsage {
+
+    /**
+     * <p>
+     * Constructs a MemoryUsage object from the CompositeData passed.
+     * </p>
+     * 
+     * @param cd The CompositeDate object to retrieve data from.
+     * @return A MemoryUsage instance.
+     * @throws IllegalArgumentException if <code>cd</code> does not contain
+     *         MemoryUsage data.
+     */
+    public static MemoryUsage from(CompositeData cd) {
+        long init = ((Long) cd.get("init")).longValue();
+        long used = ((Long) cd.get("used")).longValue();
+        long committed = ((Long) cd.get("committed")).longValue();
+        long max = ((Long) cd.get("max")).longValue();
+        return new MemoryUsage(init, used, committed, max);
+    }
+
+    private final long init;
+
+    private final long used;
+
+    private final long committed;
+
+    private final long max;
+
+    /**
+     * <p>
+     * Constructs a new MemoryUsage instance.
+     * </p>
+     * 
+     * @param init The initial amount of memory (bytes) or <code>-1</code> if
+     *        undefined.
+     * @param used The amount of memory used (bytes).
+     * @param committed The amount of memory committed (bytes).
+     * @param max The maximum amount of memory available or <code>-1</code> if
+     *        undefined.
+     * @throws IllegalArgumentException if <code>init</code> or
+     *         <code>max</code> are less than -1, <code>used</code> or
+     *         <code>committed</code> is negative, <code>used</code> is
+     *         greater than <code>committed</code> or <code>committed</code>
+     *         is greater than <code>max</code> if defined.
+     */
+    public MemoryUsage(long init, long used, long committed, long max) {
+        super();
+        if (init < -1 || max < -1) {
+            throw new IllegalArgumentException();
+        }
+        if (used < 0 || committed < 0 || used > committed) {
+            throw new IllegalArgumentException();
+        }
+        if (max != -1 && committed > max) {
+            throw new IllegalArgumentException();
+        }
+        this.init = init;
+        this.used = used;
+        this.committed = committed;
+        this.max = max;
+    }
+
+    public long getCommitted() {
+        return committed;
+    }
+
+    public long getInit() {
+        return init;
+    }
+
+    public long getMax() {
+        return max;
+    }
+
+    public long getUsed() {
+        return used;
+    }
+
+    @Override
+    public String toString() {
+        return "MemoryUsage: init=" + init + "used=" + used + "committed=" + committed + "max="
+                + max;
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/MemoryUsage.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/OperatingSystemMXBean.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/OperatingSystemMXBean.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/OperatingSystemMXBean.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/OperatingSystemMXBean.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,62 @@
+package java.lang.management;
+
+/**
+ * <p>
+ * The management interface for the operating system the JVM is running on.
+ * </p>
+ * <p>
+ * <code>ObjectName</code>: java.lang:type=OperatingSystem
+ * </p>
+ * 
+ * @since 1.5
+ */
+public interface OperatingSystemMXBean {
+    /**
+     * <p>
+     * The operating system's architecture; equivalent to
+     * <code>System.getProperty("os.arch")</code>.
+     * </p>
+     * 
+     * @return The underlying architecture of the operating system.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getArch();
+
+    /**
+     * <p>
+     * The number of processors available to the JVM; equivalent to
+     * {@link Runtime#availableProcessors()}.
+     * </p>
+     * 
+     * @return The number of available processors; guaranteed to be at least one.
+     */
+    int getAvailableProcessors();
+
+    /**
+     * <p>
+     * The name of the operating system; equivalent to
+     * <code>System.getProperty("os.name")</code>.
+     * </p>
+     * 
+     * @return The name of the operating system.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getName();
+
+    /**
+     * <p>
+     * The operating system's version; equivalent to
+     * <code>System.getProperty("os.version")</code>.
+     * </p>
+     * 
+     * @return The version of the operating system.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getVersion();
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/OperatingSystemMXBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/RuntimeMXBean.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/RuntimeMXBean.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/RuntimeMXBean.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/RuntimeMXBean.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,205 @@
+package java.lang.management;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * The management interface for the runtime system.
+ * </p>
+ * <p>
+ * <code>ObjectName</code>: java.lang:type=Runtime
+ * </p>
+ * 
+ * @since 1.5
+ */
+public interface RuntimeMXBean {
+    /**
+     * <p>
+     * The boot class path used by the JVM's bootstrap class loader.
+     * </p>
+     * 
+     * @return The boot class path.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("monitor")</code>.
+     * @see #isBootClassPathSupported()
+     */
+    String getBootClassPath();
+
+    /**
+     * <p>
+     * The class path of the JVM; equivalent to
+     * <code>System.getProperty("java.class.path")</code>.
+     * </p>
+     * 
+     * @return The class path.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getClassPath();
+
+    /**
+     * <p>
+     * The input arguments passed to the JVM upon invocation.
+     * </p>
+     * 
+     * @return A List of arguments passed to the JVM.
+     * 
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("monitor")</code>.
+     */
+    List<String> getInputArguments();
+
+    /**
+     * <p>
+     * The library path of the JVM; equivalent to
+     * <code>System.getProperty("java.library.path")</code>.
+     * </p>
+     * 
+     * @return The library path.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getLibraryPath();
+
+    /**
+     * <p>
+     * The version of the management specification implemented by the JVM.
+     * </p>
+     * 
+     * @return The management specification version.
+     */
+    String getManagementSpecVersion();
+
+    /**
+     * <p>
+     * The name of the JVM.
+     * </p>
+     * 
+     * @return The name of the JVM.
+     */
+    String getName();
+
+    /**
+     * <p>
+     * The JVM specification name; equivalent to
+     * <code>System.getProperty("java.vm.specification.name")</code>.
+     * </p>
+     * 
+     * @return The JVM specification name.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getSpecName();
+
+    /**
+     * <p>
+     * The JVM specification vendor; equivalent to
+     * <code>System.getProperty("java.vm.specification.vendor")</code>.
+     * </p>
+     * 
+     * @return The JVM specification vendor.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getSpecVendor();
+
+    /**
+     * <p>
+     * The JVM specification version; equivalent to
+     * <code>System.getProperty("java.vm.specification.version")</code>.
+     * </p>
+     * 
+     * @return The JVM specification version.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getSpecVersion();
+
+    /**
+     * <p>
+     * The approximate start time (in milliseconds) of the JVM. The time is
+     * specified by {@link System#currentTimeMillis()}.
+     * </p>
+     * 
+     * @return The start time of the JVM.
+     */
+    long getStartTime();
+
+    /**
+     * <p>
+     * The current JVM system properties, as defined by
+     * {@link System#getProperties()}. Any properties whose name or value is
+     * not of type <code>String</code> are excluded.
+     * </p>
+     * 
+     * @return The library path.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    Map<String, String> getSystemProperties();
+
+    /**
+     * <p>
+     * The approximate time elapsed (in milliseconds) since the JVM started.
+     * </p>
+     * 
+     * @return The JVM's up time.
+     */
+    long getUpTime();
+
+    /**
+     * <p>
+     * The JVM name; equivalent to
+     * <code>System.getProperty("java.vm.name")</code>.
+     * </p>
+     * 
+     * @return The JVM name.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getVmName();
+
+    /**
+     * <p>
+     * The JVM vendor; equivalent to
+     * <code>System.getProperty("java.vm.vendor")</code>.
+     * </p>
+     * 
+     * @return The JVM vendor.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getVmVendor();
+
+    /**
+     * <p>
+     * The JVM version; equivalent to
+     * <code>System.getProperty("java.vm.version")</code>.
+     * </p>
+     * 
+     * @return The JVM version.
+     * @throws SecurityException if the
+     *         {@link SecurityManager#checkPropertiesAccess(String)} doesn't
+     *         allow access.
+     */
+    String getVmVersion();
+
+    /**
+     * <p>
+     * Indicates whether or not the boot class path is supported by this JVM.
+     * </p>
+     * 
+     * @return <code>true</code> if supported, <code>false</code> otherwise.
+     */
+    boolean isBootClassPathSupported();
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/RuntimeMXBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,78 @@
+package java.lang.management;
+
+import javax.management.openmbean.CompositeData;
+
+/**
+ * <p>
+ * Thread information.
+ * </p>
+ * 
+ * @since 1.5
+ */
+public class ThreadInfo {
+
+    public static ThreadInfo from(CompositeData cd) {
+        return null;
+    }
+
+    ThreadInfo() {
+        super();
+    }
+
+    public long getBlockedCount() {
+        return -1;
+    }
+
+    public long getBlockedTime() {
+        return -1;
+    }
+
+    public String getLockName() {
+        return null;
+    }
+
+    public long getLockOwnerId() {
+        return -1;
+    }
+
+    public String getLockOwnerName() {
+        return null;
+    }
+
+    public StackTraceElement[] getStackTrace() {
+        return null;
+    }
+
+    public long getThreadId() {
+        return -1;
+    }
+
+    public String getThreadName() {
+        return null;
+    }
+
+    public Thread.State getThreadState() {
+        return null;
+    }
+
+    public long getWaitedCount() {
+        return -1;
+    }
+
+    public long getWaitedTime() {
+        return -1;
+    }
+
+    public boolean isInNative() {
+        return false;
+    }
+
+    public boolean isSuspended() {
+        return false;
+    }
+
+    @Override
+    public String toString() {
+        return super.toString();
+    }
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadInfo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadMXBean.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadMXBean.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadMXBean.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadMXBean.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,283 @@
+package java.lang.management;
+
+/**
+ * <p>
+ * The management interface for the thread system.
+ * </p>
+ * <p>
+ * <code>ObjectName</code>: java.lang:type=Threading
+ * </p>
+ * 
+ * @since 1.5
+ */
+public interface ThreadMXBean {
+    /**
+     * <p>
+     * Finds cycles of threads that are in deadlock waiting to acquire and
+     * object monitor.
+     * </p>
+     * 
+     * @return An array of thread IDs of deadlocked.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("monitor")</code>.
+     * @see Thread#getId()
+     */
+    long[] findMonitorDeadlockedThreads();
+
+    /**
+     * <p>
+     * The ID of all currently live threads.
+     * </p>
+     * 
+     * @return An array of thread IDs.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("monitor")</code>.
+     * @see Thread#getId()
+     */
+    long[] getAllThreadIds();
+
+    /**
+     * <p>
+     * The total CPU time (in nanoseconds) for the current thread. This is
+     * convenience method for {@link #getThreadCpuTime(long) getThreadCpuTime}<code>(Thread.currentThread().getId());</code>.
+     * </p>
+     * 
+     * @return The total CPU time for the current thread.
+     * @throws UnsupportedOperationException if this is not supported.
+     */
+    long getCurrentThreadCpuTime();
+
+    /**
+     * <p>
+     * The total user time (in nanoseconds) for the current thread. This is
+     * convenience method for {@link #getThreadUserTime(long) getThreadUserTime}<code>(Thread.currentThread().getId());</code>.
+     * </p>
+     * 
+     * @return The total user time for the current thread.
+     * @throws UnsupportedOperationException if this is not supported.
+     */
+    long getCurrentThreadUserTime();
+
+    /**
+     * <p>
+     * The current number of live daemon threads.
+     * </p>
+     * 
+     * @return The number of daemon threads.
+     */
+    int getDaemonThreadCount();
+
+    /**
+     * <p>
+     * The peak number of live threads since JVM start or the last reset.
+     * </p>
+     * 
+     * @return The peak number of threads.
+     * @see #resetPeakThreadCount()
+     */
+    int getPeakThreadCount();
+
+    /**
+     * <p>
+     * The current number of live threads (daemon and non-daemon).
+     * </p>
+     * 
+     * @return The number of threads.
+     */
+    int getThreadCount();
+
+    /**
+     * <p>
+     * The total CPU time (in nanoseconds) for the given thread.
+     * </p>
+     * 
+     * @param id The ID of the thread to get the CPU time for.
+     * @return The total CPU time for the current thread or -1 if the thread is
+     *         not alive or measurement is not enabled.
+     * @throws IllegalArgumentException if <code>id</code> is less than or
+     *         equal to 0.
+     * @throws UnsupportedOperationException if this is not supported.
+     */
+    long getThreadCpuTime(long id);
+
+    /**
+     * <p>
+     * The thread information for the given thread with a stack trace depth of
+     * zero.
+     * </p>
+     * 
+     * @param id The ID of the thread to get information for.
+     * @return A {@link ThreadInfo} instance representing the information of the
+     *         given thread or <code>null</code> if the thread is not alive or
+     *         doesn't exist.
+     * @throws IllegalArgumentException if <code>id</code> is less than or
+     *         equal to 0.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("monitor")</code>.
+     */
+    ThreadInfo getThreadInfo(long id);
+
+    /**
+     * <p>
+     * The thread information for the given threads with a stack trace depth of
+     * zero.
+     * </p>
+     * 
+     * @param ids An array of IDs of the threads to get information for.
+     * @return An array of {@link ThreadInfo} instance representing the
+     *         information of the given threads.
+     * @throws IllegalArgumentException if and element in <code>ids</code> is
+     *         less than or equal to 0.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("monitor")</code>.
+     */
+    ThreadInfo[] getThreadInfo(long[] ids);
+
+    /**
+     * <p>
+     * The thread information for the given threads, which is qualified by a
+     * maximum stack trace depth.
+     * </p>
+     * 
+     * @param ids An array of IDs of the threads to get information for.
+     * @param maxDepth The maximum depth of the stack trace to return in the
+     *        {@link ThreadInfo}. If zero, then an empty array is stored. If
+     *        {@link Integer#MAX_VALUE}, then the entire stack trace is
+     *        returned.
+     * @return An array of {@link ThreadInfo} instance representing the
+     *         information of the given threads.
+     * @throws IllegalArgumentException if and element in <code>ids</code> is
+     *         less than or equal to 0.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("monitor")</code>.
+     */
+    ThreadInfo[] getThreadInfo(long[] ids, int maxDepth);
+
+    /**
+     * <p>
+     * The thread information for the given thread with a stack trace depth of
+     * zero.
+     * </p>
+     * 
+     * @param id The ID of the thread to get information for.
+     * @param maxDepth The maximum depth of the stack trace to return in the
+     *        {@link ThreadInfo}. If zero, then an empty array is stored. If
+     *        {@link Integer#MAX_VALUE}, then the entire stack trace is
+     *        returned.
+     * @return A {@link ThreadInfo} instance representing the information of the
+     *         given thread or <code>null</code> if the thread is not alive or
+     *         doesn't exist.
+     * @throws IllegalArgumentException if <code>id</code> is less than or
+     *         equal to 0.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("monitor")</code>.
+     */
+    ThreadInfo getThreadInfo(long id, int maxDepth);
+
+    /**
+     * <p>
+     * The total user time (in nanoseconds) for the given thread.
+     * </p>
+     * 
+     * @param id The ID of the thread to get the user time for.
+     * @return The total user time for the current thread or -1 if the thread is
+     *         not alive or measurement is not enabled.
+     * @throws IllegalArgumentException if <code>id</code> is less than or
+     *         equal to 0.
+     * @throws UnsupportedOperationException if this is not supported.
+     */
+    long getThreadUserTime(long id);
+
+    /**
+     * <p>
+     * The total number of threads that have been created and started within the
+     * JVM.
+     * </p>
+     * 
+     * @return The total number of created and started threads.
+     */
+    long getTotalStartedThreadCount();
+
+    /**
+     * <p>
+     * Indicates whether or not current thread CPU time monitoring is supported.
+     * </p>
+     * 
+     * @return <code>true</code> if supported, otherwise <code>false</code>.
+     */
+    boolean isCurrentThreadCpuTimeSupported();
+
+    /**
+     * <p>
+     * Indicates whether or not thread contention monitoring is enabled.
+     * </p>
+     * 
+     * @return <code>true</code> if enabled, otherwise <code>false</code>.
+     */
+    boolean isThreadContentionMonitoringEnabled();
+
+    /**
+     * <p>
+     * Indicates whether or not thread contention monitoring is supported.
+     * </p>
+     * 
+     * @return <code>true</code> if supported, otherwise <code>false</code>.
+     */
+    boolean isThreadContentionMonitoringSupported();
+
+    /**
+     * <p>
+     * Indicates whether or not thread CPU time monitoring is enabled.
+     * </p>
+     * 
+     * @return <code>true</code> if enabled, otherwise <code>false</code>.
+     */
+    boolean isThreadCpuTimeEnabled();
+
+    /**
+     * <p>
+     * Indicates whether or not thread CPU time monitoring is supported.
+     * </p>
+     * 
+     * @return <code>true</code> if supported, otherwise <code>false</code>.
+     */
+    boolean isThreadCpuTimeSupported();
+
+    /**
+     * <p>
+     * Resets the peak thread count to the current thread count.
+     * </p>
+     * 
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("control")</code>.
+     */
+    void resetPeakThreadCount();
+
+    /**
+     * <p>
+     * Enables or disables thread contention monitoring.
+     * </p>
+     * 
+     * @param enable <code>true</code> to enable, <code>false</code> to
+     *        disable.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("control")</code>.
+     * @see #isThreadContentionMonitoringSupported()
+     */
+    void setThreadContentionMonitoringEnabled(boolean enable);
+
+    /**
+     * <p>
+     * Enables or disables thread CPU time monitoring.
+     * </p>
+     * 
+     * @param enable <code>true</code> to enable, <code>false</code> to
+     *        disable.
+     * @throws UnsupportedOperationException if this is not supported.
+     * @throws SecurityException if caller doesn't have
+     *         <code>ManagementPermission("control")</code>.
+     * @see #isThreadCpuTimeSupported()
+     */
+    void setThreadCpuTimeEnabled(boolean enable);
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/main/java/java/lang/management/ThreadMXBean.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/tests/java/lang/management/ManagementPermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/tests/java/lang/management/ManagementPermissionTest.java?rev=432880&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/tests/java/lang/management/ManagementPermissionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/tests/java/lang/management/ManagementPermissionTest.java Sat Aug 19 14:19:31 2006
@@ -0,0 +1,61 @@
+package org.apache.harmony.langmanagement.tests.java.lang.management;
+
+import java.lang.management.ManagementPermission;
+
+import junit.framework.TestCase;
+
+public class ManagementPermissionTest extends TestCase {
+
+    public void testManagementPermissionString() {
+        ManagementPermission control = new ManagementPermission("control");
+        assertEquals("control", control.getName());
+
+        ManagementPermission monitor = new ManagementPermission("monitor");
+        assertEquals("monitor", monitor.getName());
+
+        try {
+            new ManagementPermission("invalid");
+            fail();
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+    public void testManagementPermissionStringString() {
+        ManagementPermission control = new ManagementPermission("control", null);
+        assertEquals("control", control.getName());
+        
+        control = new ManagementPermission("control", "");
+        assertEquals("control", control.getName());
+
+        ManagementPermission monitor = new ManagementPermission("monitor", null);
+        assertEquals("monitor", monitor.getName());
+        
+        monitor = new ManagementPermission("monitor", "");
+        assertEquals("monitor", monitor.getName());
+
+        try {
+            new ManagementPermission("invalid", null);
+            fail();
+        } catch (IllegalArgumentException e) {
+        }
+        
+        try {
+            new ManagementPermission("invalid", "");
+            fail();
+        } catch (IllegalArgumentException e) {
+        }
+        
+        try {
+            new ManagementPermission("control", "actions");
+            fail();
+        } catch (IllegalArgumentException e) {
+        }
+        
+        try {
+            new ManagementPermission("monitor", "actions");
+            fail();
+        } catch (IllegalArgumentException e) {
+        }
+    }
+
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/lang-management/src/test/java/org/apache/harmony/langmanagement/tests/java/lang/management/ManagementPermissionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message