01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17:
18: package java.lang.management;
19:
20: /**
21: * <p>
22: * <code>OperatingSystemMXBean</code> is an interface used by the management
23: * system to access operating system properties.
24: * </p>
25: * <p>
26: * <code>ObjectName</code>: java.lang:type=OperatingSystem
27: * </p>
28: *
29: * @since 1.5
30: */
31: public interface OperatingSystemMXBean {
32: /**
33: * <p>
34: * The operating system's architecture; equivalent to
35: * <code>System.getProperty("os.arch")</code>.
36: * </p>
37: *
38: * @return The underlying architecture of the operating system.
39: * @throws SecurityException if the
40: * {@link SecurityManager#checkPropertyAccess(String)} doesn't
41: * allow access.
42: */
43: String getArch();
44:
45: /**
46: * <p>
47: * The number of processors available to the JVM; equivalent to
48: * {@link Runtime#availableProcessors()}.
49: * </p>
50: *
51: * @return The number of available processors; guaranteed to be at least one.
52: */
53: int getAvailableProcessors();
54:
55: /**
56: * <p>
57: * The name of the operating system; equivalent to
58: * <code>System.getProperty("os.name")</code>.
59: * </p>
60: *
61: * @return The name of the operating system.
62: * @throws SecurityException if the
63: * {@link SecurityManager#checkPropertyAccess(String)} doesn't
64: * allow access.
65: */
66: String getName();
67:
68: /**
69: * <p>
70: * The operating system's version; equivalent to
71: * <code>System.getProperty("os.version")</code>.
72: * </p>
73: *
74: * @return The version of the operating system.
75: * @throws SecurityException if the
76: * {@link SecurityManager#checkPropertyAccess(String)} doesn't
77: * allow access.
78: */
79: String getVersion();
80: }
|