2362N/A * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 0N/A * @summary Check that java.lang.management MXBeans have the same behavior 0N/A * @author Eamonn McManus 0N/A /* Test that all the MBeans in the java.* and com.sun.management* 0N/A domains are MXBeans with the appropriate behavior. */ 0N/A /* Now do some rudimentary testing of inter-MXBean references. 0N/A It should be possible for a user MXBean to return e.g. the 0N/A CompilationMXBean from the platform from an attribute of 0N/A type CompilationMXBean, and have the MXBean infrastructure 0N/A map this into that MXBean's standard ObjectName. It should 0N/A also be possible for a proxy for this user MXBean to have 0N/A this attribute's value mapped back into a CompilationMXBean 0N/A instance, which however will be another proxy rather than 0N/A the original object. Finally, it should be possible to set 0N/A the attribute in the user's MXBean through a proxy, giving 0N/A the real CompilationMXBean as an argument, and have this be 0N/A translated into that MXBean's standard ObjectName. The 0N/A user's MXBean will receive a proxy in this case, though we 0N/A don't check that. */ 0N/A "Referenced object name");
0N/A /* Check the behavior of this MXBean to ensure that it conforms to 0N/A what is expected of all MXBeans as detailed in 0N/A javax.management.MXBean. Its MBeanInfo should have a 0N/A Descriptor with the fields mxbean and interfaceClassName, and 0N/A furthermore we know that our implementation sets immutableInfo 0N/A here. Each attribute should have Descriptor with the fields 0N/A openType and originalType that have appropriate values. We 0N/A don't currently check operations though the same considerations 0N/A would apply there. (If the MBeanInfo and MBeanAttributeInfo 0N/A tests pass we can reasonably suppose that this MXBean will 0N/A behave the same as all other MXBeans, so MBeanOperationInfo, 0N/A MBeanNotificationInfo, and MBeanConstructorInfo will be covered 0N/A by generic MXBean tests. 0N/A "interfaceClassName",
0N/A "Proxy name in setCompilationMXBean");