author | mchung |
Tue, 29 Mar 2011 15:50:55 -0700 | |
changeset 9013 | eedac0b9f552 |
parent 5506 | 202f599c92aa |
permissions | -rw-r--r-- |
2 | 1 |
/* |
5506 | 2 |
* Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package java.lang.management; |
|
27 |
||
28 |
/** |
|
29 |
* The management interface for the class loading system of |
|
30 |
* the Java virtual machine. |
|
31 |
* |
|
32 |
* <p> A Java virtual machine has a single instance of the implementation |
|
33 |
* class of this interface. This instance implementing this interface is |
|
34 |
* an <a href="ManagementFactory.html#MXBean">MXBean</a> |
|
35 |
* that can be obtained by calling |
|
36 |
* the {@link ManagementFactory#getClassLoadingMXBean} method or |
|
37 |
* from the {@link ManagementFactory#getPlatformMBeanServer |
|
401
ef01e0dccd63
6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents:
2
diff
changeset
|
38 |
* platform <tt>MBeanServer</tt>}. |
2 | 39 |
* |
40 |
* <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for |
|
41 |
* the class loading system within an <tt>MBeanServer</tt> is: |
|
42 |
* <blockquote> |
|
43 |
* {@link ManagementFactory#CLASS_LOADING_MXBEAN_NAME |
|
44 |
* <tt>java.lang:type=ClassLoading</tt>} |
|
45 |
* </blockquote> |
|
46 |
* |
|
401
ef01e0dccd63
6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents:
2
diff
changeset
|
47 |
* It can be obtained by calling the |
ef01e0dccd63
6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents:
2
diff
changeset
|
48 |
* {@link PlatformManagedObject#getObjectName} method. |
ef01e0dccd63
6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents:
2
diff
changeset
|
49 |
* |
ef01e0dccd63
6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents:
2
diff
changeset
|
50 |
* @see ManagementFactory#getPlatformMXBeans(Class) |
2 | 51 |
* @see <a href="../../../javax/management/package-summary.html"> |
52 |
* JMX Specification.</a> |
|
53 |
* @see <a href="package-summary.html#examples"> |
|
54 |
* Ways to Access MXBeans</a> |
|
55 |
* |
|
56 |
* @author Mandy Chung |
|
57 |
* @since 1.5 |
|
58 |
*/ |
|
401
ef01e0dccd63
6610094: Add generic support for platform MXBeans of any type (also fixed 6681031)
mchung
parents:
2
diff
changeset
|
59 |
public interface ClassLoadingMXBean extends PlatformManagedObject { |
2 | 60 |
|
61 |
/** |
|
62 |
* Returns the total number of classes that have been loaded since |
|
63 |
* the Java virtual machine has started execution. |
|
64 |
* |
|
65 |
* @return the total number of classes loaded. |
|
66 |
* |
|
67 |
*/ |
|
68 |
public long getTotalLoadedClassCount(); |
|
69 |
||
70 |
/** |
|
71 |
* Returns the number of classes that are currently loaded in the |
|
72 |
* Java virtual machine. |
|
73 |
* |
|
74 |
* @return the number of currently loaded classes. |
|
75 |
*/ |
|
76 |
public int getLoadedClassCount(); |
|
77 |
||
78 |
/** |
|
79 |
* Returns the total number of classes unloaded since the Java virtual machine |
|
80 |
* has started execution. |
|
81 |
* |
|
82 |
* @return the total number of unloaded classes. |
|
83 |
*/ |
|
84 |
public long getUnloadedClassCount(); |
|
85 |
||
86 |
/** |
|
87 |
* Tests if the verbose output for the class loading system is enabled. |
|
88 |
* |
|
89 |
* @return <tt>true</tt> if the verbose output for the class loading |
|
90 |
* system is enabled; <tt>false</tt> otherwise. |
|
91 |
*/ |
|
92 |
public boolean isVerbose(); |
|
93 |
||
94 |
/** |
|
95 |
* Enables or disables the verbose output for the class loading |
|
96 |
* system. The verbose output information and the output stream |
|
97 |
* to which the verbose information is emitted are implementation |
|
98 |
* dependent. Typically, a Java virtual machine implementation |
|
99 |
* prints a message each time a class file is loaded. |
|
100 |
* |
|
101 |
* <p>This method can be called by multiple threads concurrently. |
|
102 |
* Each invocation of this method enables or disables the verbose |
|
103 |
* output globally. |
|
104 |
* |
|
105 |
* @param value <tt>true</tt> to enable the verbose output; |
|
106 |
* <tt>false</tt> to disable. |
|
107 |
* |
|
108 |
* @exception java.lang.SecurityException if a security manager |
|
109 |
* exists and the caller does not have |
|
110 |
* ManagementPermission("control"). |
|
111 |
*/ |
|
112 |
public void setVerbose(boolean value); |
|
113 |
||
114 |
} |