KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > lang > management > ClassLoadingMXBean


1 /*
2  * @(#)ClassLoadingMXBean.java 1.11 04/04/20
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package java.lang.management;
9
10 /**
11  * The management interface for the class loading system of
12  * the Java virtual machine.
13  *
14  * <p> A Java virtual machine has a single instance of the implementation
15  * class of this interface. This instance implementing this interface is
16  * an <a HREF="ManagementFactory.html#MXBean">MXBean</a>
17  * that can be obtained by calling
18  * the {@link ManagementFactory#getClassLoadingMXBean} method or
19  * from the {@link ManagementFactory#getPlatformMBeanServer
20  * platform <tt>MBeanServer</tt>} method.
21  *
22  * <p>The <tt>ObjectName</tt> for uniquely identifying the MXBean for
23  * the class loading system within an <tt>MBeanServer</tt> is:
24  * <blockquote>
25  * {@link ManagementFactory#CLASS_LOADING_MXBEAN_NAME
26  * <tt>java.lang:type=ClassLoading</tt>}
27  * </blockquote>
28  *
29  * @see <a HREF="../../../javax/management/package-summary.html">
30  * JMX Specification.</a>
31  * @see <a HREF="package-summary.html#examples">
32  * Ways to Access MXBeans</a>
33  *
34  * @author Mandy Chung
35  * @version 1.11, 04/20/04
36  * @since 1.5
37  */

38 public interface ClassLoadingMXBean {
39     
40     /**
41      * Returns the total number of classes that have been loaded since
42      * the Java virtual machine has started execution.
43      *
44      * @return the total number of classes loaded.
45      *
46      */

47     public long getTotalLoadedClassCount();
48     
49     /**
50      * Returns the number of classes that are currently loaded in the
51      * Java virtual machine.
52      *
53      * @return the number of currently loaded classes.
54      */

55     public int getLoadedClassCount();
56     
57     /**
58      * Returns the total number of classes unloaded since the Java virtual machine
59      * has started execution.
60      *
61      * @return the total number of unloaded classes.
62      */

63     public long getUnloadedClassCount();
64
65     /**
66      * Tests if the verbose output for the class loading system is enabled.
67      *
68      * @return <tt>true</tt> if the verbose output for the class loading
69      * system is enabled; <tt>false</tt> otherwise.
70      */

71     public boolean isVerbose();
72
73     /**
74      * Enables or disables the verbose output for the class loading
75      * system. The verbose output information and the output stream
76      * to which the verbose information is emitted are implementation
77      * dependent. Typically, a Java virtual machine implementation
78      * prints a message each time a class file is loaded.
79      *
80      * <p>This method can be called by multiple threads concurrently.
81      * Each invocation of this method enables or disables the verbose
82      * output globally.
83      *
84      * @param value <tt>true</tt> to enable the verbose output;
85      * <tt>false</tt> to disable.
86      *
87      * @exception java.lang.SecurityException if a security manager
88      * exists and the caller does not have
89      * ManagementPermission("control").
90      */

91     public void setVerbose(boolean value);
92
93 }
94
95
Popular Tags