KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > system > server > ServerInfoMBean


1 /*
2  * JBoss, Home of Professional Open Source
3  * Copyright 2005, JBoss Inc., and individual contributors as indicated
4  * by the @authors tag. See the copyright.txt in the distribution for a
5  * full listing of individual contributors.
6  *
7  * This is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU Lesser General Public License as
9  * published by the Free Software Foundation; either version 2.1 of
10  * the License, or (at your option) any later version.
11  *
12  * This software is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this software; if not, write to the Free
19  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21  */

22 package org.jboss.system.server;
23
24 import javax.management.ObjectName JavaDoc;
25
26 /**
27  * ServerInfo MBean interface.
28  *
29  * @version $Revision: 57108 $
30  */

31 public interface ServerInfoMBean
32 {
33    /** The default ObjectName */
34    final String JavaDoc OBJECT_NAME_STR = "jboss.system:type=ServerInfo";
35
36    // Attributes ----------------------------------------------------
37

38    String JavaDoc getJavaVersion();
39    String JavaDoc getJavaVendor();
40
41    String JavaDoc getJavaVMName();
42    String JavaDoc getJavaVMVersion();
43    String JavaDoc getJavaVMVendor();
44
45    String JavaDoc getOSName();
46    String JavaDoc getOSVersion();
47    String JavaDoc getOSArch();
48
49    Integer JavaDoc getActiveThreadCount();
50    Integer JavaDoc getActiveThreadGroupCount();
51    
52    /** Returns <tt>Runtime.getRuntime().maxMemory()<tt> on JDK 1.4 vms or -1 on previous versions. */
53    Long JavaDoc getMaxMemory();
54    Long JavaDoc getTotalMemory();
55    Long JavaDoc getFreeMemory();
56
57    /** Returns <tt>Runtime.getRuntime().availableProcessors()</tt> on JDK 1.4 vms or -1 on previous versions. */
58    Integer JavaDoc getAvailableProcessors();
59
60    /** Returns InetAddress.getLocalHost().getHostName(); */
61    String JavaDoc getHostName();
62
63    /** Returns InetAddress.getLocalHost().getHostAddress(); */
64    String JavaDoc getHostAddress();
65
66    // Operations ----------------------------------------------------
67

68    /**
69     * Return a listing of the thread pools on jdk5+.
70     * @param fancy produce a text-based graph when true
71     */

72    String JavaDoc listMemoryPools(boolean fancy);
73
74    /**
75     * Return a listing of the active threads and thread groups,
76     * and a full stack trace for every thread, on jdk5+.
77     */

78    String JavaDoc listThreadDump();
79
80    /**
81     * Return a sort list of thread cpu utilization.
82     */

83    String JavaDoc listThreadCpuUtilization();
84
85    /**
86     * Display the java.lang.Package info for the pkgName
87     */

88    String JavaDoc displayPackageInfo(String JavaDoc pkgName);
89
90 }
91
Popular Tags