jdk/src/share/classes/javax/management/MBeanServer.java
author rriggs
Tue, 12 Nov 2013 14:03:28 -0500
changeset 21656 d4c777ccb1db
parent 5506 202f599c92aa
child 23010 6dadb192ad81
permissions -rw-r--r--
8028014: Doclint warning/error cleanup in javax.management Summary: Improve generated html by fixing doclint warnings Reviewed-by: sla, jbachorik
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     2
 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4156
diff changeset
    23
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
package javax.management;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
// java import
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
import java.util.Set;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
import java.io.ObjectInputStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
// RI import
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
import javax.management.loading.ClassLoaderRepository;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * <p>This is the interface for MBean manipulation on the agent
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * side. It contains the methods necessary for the creation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * registration, and deletion of MBeans as well as the access methods
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * for registered MBeans.  This is the core component of the JMX
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * infrastructure.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * <p>User code does not usually implement this interface.  Instead,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * an object that implements this interface is obtained with one of
1156
bbc2d15aaf7a 5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents: 1154
diff changeset
    45
 * the methods in the {@link javax.management.MBeanServerFactory} class.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * <p>Every MBean which is added to the MBean server becomes
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * manageable: its attributes and operations become remotely
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * accessible through the connectors/adaptors connected to that MBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * server.  A Java object cannot be registered in the MBean server
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * unless it is a JMX compliant MBean.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 *
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
    53
 * <p id="notif">When an MBean is registered or unregistered in the
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
    54
 * MBean server a {@link javax.management.MBeanServerNotification
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * MBeanServerNotification} Notification is emitted. To register an
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * object as listener to MBeanServerNotifications you should call the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * MBean server method {@link #addNotificationListener
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * addNotificationListener} with <CODE>ObjectName</CODE> the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * <CODE>ObjectName</CODE> of the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 * javax.management.MBeanServerDelegate MBeanServerDelegate}.  This
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * <CODE>ObjectName</CODE> is: <BR>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * <CODE>JMImplementation:type=MBeanServerDelegate</CODE>.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 *
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
    64
 * <p>An object obtained from the {@link
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
    65
 * MBeanServerFactory#createMBeanServer(String) createMBeanServer} or
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
    66
 * {@link MBeanServerFactory#newMBeanServer(String) newMBeanServer}
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * methods of the {@link MBeanServerFactory} class applies security
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * checks to its methods, as follows.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * <p>First, if there is no security manager ({@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 * System#getSecurityManager()} is null), then an implementation of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * this interface is free not to make any checks.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 * <p>Assuming that there is a security manager, or that the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * implementation chooses to make checks anyway, the checks are made
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
    76
 * as detailed below.  In what follows, and unless otherwise specified,
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
    77
 * {@code className} is the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 * string returned by {@link MBeanInfo#getClassName()} for the target
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
    79
 * MBean.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 * <p>If a security check fails, the method throws {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 * SecurityException}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 * <p>For methods that can throw {@link InstanceNotFoundException},
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 * this exception is thrown for a non-existent MBean, regardless of
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 * permissions.  This is because a non-existent MBean has no
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 * <code>className</code>.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
 * <li><p>For the {@link #invoke invoke} method, the caller's
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
 * permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
    93
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
    94
 * MBeanPermission(className, operationName, name, "invoke")}.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
 * <li><p>For the {@link #getAttribute getAttribute} method, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
 * caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
    98
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
    99
 * MBeanPermission(className, attribute, name, "getAttribute")}.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
 * <li><p>For the {@link #getAttributes getAttributes} method, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
 * caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   103
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   104
 * MBeanPermission(className, null, name, "getAttribute")}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
 * Additionally, for each attribute <em>a</em> in the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
 * AttributeList}, if the caller's permissions do not imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   107
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   108
 * MBeanPermission(className, <em>a</em>, name, "getAttribute")}, the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
 * MBean server will behave as if that attribute had not been in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 * supplied list.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
 * <li><p>For the {@link #setAttribute setAttribute} method, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
 * caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   114
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   115
 * MBeanPermission(className, attrName, name, "setAttribute")}, where
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 * <code>attrName</code> is {@link Attribute#getName()
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 * attribute.getName()}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 * <li><p>For the {@link #setAttributes setAttributes} method, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
 * caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   121
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   122
 * MBeanPermission(className, null, name, "setAttribute")}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
 * Additionally, for each attribute <em>a</em> in the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 * AttributeList}, if the caller's permissions do not imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   125
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   126
 * MBeanPermission(className, <em>a</em>, name, "setAttribute")}, the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
 * MBean server will behave as if that attribute had not been in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 * supplied list.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
 * <li><p>For the <code>addNotificationListener</code> methods,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
 * the caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   132
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   133
 * MBeanPermission(className, null, name,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
 * "addNotificationListener")}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
 * <li><p>For the <code>removeNotificationListener</code> methods,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
 * the caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   138
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   139
 * MBeanPermission(className, null, name,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
 * "removeNotificationListener")}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
 * <li><p>For the {@link #getMBeanInfo getMBeanInfo} method, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
 * caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   144
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   145
 * MBeanPermission(className, null, name, "getMBeanInfo")}.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
 * <li><p>For the {@link #getObjectInstance getObjectInstance} method,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
 * the caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   149
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   150
 * MBeanPermission(className, null, name, "getObjectInstance")}.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
 * <li><p>For the {@link #isInstanceOf isInstanceOf} method, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
 * caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   154
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   155
 * MBeanPermission(className, null, name, "isInstanceOf")}.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
 * <li><p>For the {@link #queryMBeans queryMBeans} method, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
 * caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   159
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   160
 * MBeanPermission(null, null, null, "queryMBeans")}.
1705
08644ea24ce6 6780803: Wrong parameter name in description of EventClient::addListeners()
emcmanus
parents: 1700
diff changeset
   161
 * Additionally, for each MBean <em>n</em> that matches <code>name</code>,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
 * if the caller's permissions do not imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   163
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   164
 * MBeanPermission(className, null, <em>n</em>, "queryMBeans")}, the
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   165
 * MBean server will behave as if that MBean did not exist.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
 * <p>Certain query elements perform operations on the MBean server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
 * If the caller does not have the required permissions for a given
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
 * MBean, that MBean will not be included in the result of the query.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
 * The standard query elements that are affected are {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
 * Query#attr(String)}, {@link Query#attr(String,String)}, and {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
 * Query#classattr()}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
 * <li><p>For the {@link #queryNames queryNames} method, the checks
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
 * are the same as for <code>queryMBeans</code> except that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
 * <code>"queryNames"</code> is used instead of
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
 * <code>"queryMBeans"</code> in the <code>MBeanPermission</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
 * objects.  Note that a <code>"queryMBeans"</code> permission implies
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
 * the corresponding <code>"queryNames"</code> permission.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
 * <li><p>For the {@link #getDomains getDomains} method, the caller's
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
 * permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   183
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   184
 * MBeanPermission(null, null, null, "getDomains")}.  Additionally,
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   185
 * for each domain <var>d</var> in the returned array, if the caller's
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   186
 * permissions do not imply {@link
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
 * MBeanPermission(null, null, new ObjectName("<var>d</var>:x=x"),
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
 * "getDomains")}, the domain is eliminated from the array.  Here,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
 * <code>x=x</code> is any <var>key=value</var> pair, needed to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
 * satisfy ObjectName's constructor but not otherwise relevant.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
 * <li><p>For the {@link #getClassLoader getClassLoader} method, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
 * caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   195
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   196
 * MBeanPermission(className, null, loaderName,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
 * "getClassLoader")}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
 * <li><p>For the {@link #getClassLoaderFor getClassLoaderFor} method,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
 * the caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   201
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   202
 * MBeanPermission(className, null, mbeanName,
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
 * "getClassLoaderFor")}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
 * <li><p>For the {@link #getClassLoaderRepository
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
 * getClassLoaderRepository} method, the caller's permissions must
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
 * imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   208
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   209
 * MBeanPermission(null, null, null, "getClassLoaderRepository")}.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
 * <li><p>For the deprecated <code>deserialize</code> methods, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
 * required permissions are the same as for the methods that replace
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
 * them.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
 * <li><p>For the <code>instantiate</code> methods, the caller's
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
 * permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   217
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   218
 * MBeanPermission(className, null, null, "instantiate")},
1156
bbc2d15aaf7a 5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents: 1154
diff changeset
   219
 * where {@code className} is the name of the class which is to
bbc2d15aaf7a 5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents: 1154
diff changeset
   220
 * be instantiated.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
 * <li><p>For the {@link #registerMBean registerMBean} method, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
 * caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   224
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   225
 * MBeanPermission(className, null, name, "registerMBean")}.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
 * <p>If the <code>MBeanPermission</code> check succeeds, the MBean's
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
 * class is validated by checking that its {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
 * java.security.ProtectionDomain ProtectionDomain} implies {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
 * MBeanTrustPermission#MBeanTrustPermission(String)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
 * MBeanTrustPermission("register")}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
 * <p>Finally, if the <code>name</code> argument is null, another
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
 * <code>MBeanPermission</code> check is made using the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
 * <code>ObjectName</code> returned by {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
 * MBeanRegistration#preRegister MBeanRegistration.preRegister}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
 * <li><p>For the <code>createMBean</code> methods, the caller's
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
 * permissions must imply the permissions needed by the equivalent
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
 * <code>instantiate</code> followed by
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
 * <code>registerMBean</code>.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
 * <li><p>For the {@link #unregisterMBean unregisterMBean} method,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
 * the caller's permissions must imply {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   245
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   246
 * MBeanPermission(className, null, name, "unregisterMBean")}.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
 * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
/* DELETED:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
 * <li><p>For the {@link #isRegistered isRegistered} method, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
 * caller's permissions must imply {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
 * MBeanPermission#MBeanPermission(String,String,ObjectName,String)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
 * MBeanPermission(null, null, name, "isRegistered")}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
public interface MBeanServer extends MBeanServerConnection {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   262
    /**
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   263
     * {@inheritDoc}
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   264
     * <p>If this method successfully creates an MBean, a notification
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   265
     * is sent as described <a href="#notif">above</a>.</p>
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   266
     *
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   267
     * @throws RuntimeOperationsException {@inheritDoc}
1154
4561ee1fb2b7 6405862: Allow CompositeType to have zero items
emcmanus
parents: 1015
diff changeset
   268
     * @throws RuntimeMBeanException {@inheritDoc}
4561ee1fb2b7 6405862: Allow CompositeType to have zero items
emcmanus
parents: 1015
diff changeset
   269
     * @throws RuntimeErrorException {@inheritDoc}
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   270
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
    public ObjectInstance createMBean(String className, ObjectName name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
            throws ReflectionException, InstanceAlreadyExistsException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
                   MBeanRegistrationException, MBeanException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
                   NotCompliantMBeanException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   276
    /**
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   277
     * {@inheritDoc}
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   278
     * <p>If this method successfully creates an MBean, a notification
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   279
     * is sent as described <a href="#notif">above</a>.</p>
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   280
     *
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   281
     * @throws RuntimeOperationsException {@inheritDoc}
1154
4561ee1fb2b7 6405862: Allow CompositeType to have zero items
emcmanus
parents: 1015
diff changeset
   282
     * @throws RuntimeMBeanException {@inheritDoc}
4561ee1fb2b7 6405862: Allow CompositeType to have zero items
emcmanus
parents: 1015
diff changeset
   283
     * @throws RuntimeErrorException {@inheritDoc}
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   284
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
    public ObjectInstance createMBean(String className, ObjectName name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
                                      ObjectName loaderName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
            throws ReflectionException, InstanceAlreadyExistsException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
                   MBeanRegistrationException, MBeanException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
                   NotCompliantMBeanException, InstanceNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   291
    /**
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   292
     * {@inheritDoc}
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   293
     * <p>If this method successfully creates an MBean, a notification
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   294
     * is sent as described <a href="#notif">above</a>.</p>
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   295
     *
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   296
     * @throws RuntimeOperationsException {@inheritDoc}
1154
4561ee1fb2b7 6405862: Allow CompositeType to have zero items
emcmanus
parents: 1015
diff changeset
   297
     * @throws RuntimeMBeanException {@inheritDoc}
4561ee1fb2b7 6405862: Allow CompositeType to have zero items
emcmanus
parents: 1015
diff changeset
   298
     * @throws RuntimeErrorException {@inheritDoc}
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   299
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
    public ObjectInstance createMBean(String className, ObjectName name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
                                      Object params[], String signature[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
            throws ReflectionException, InstanceAlreadyExistsException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
                   MBeanRegistrationException, MBeanException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
                   NotCompliantMBeanException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   306
    /**
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   307
     * {@inheritDoc}
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   308
     * <p>If this method successfully creates an MBean, a notification
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   309
     * is sent as described <a href="#notif">above</a>.</p>
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   310
     *
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   311
     * @throws RuntimeOperationsException {@inheritDoc}
1154
4561ee1fb2b7 6405862: Allow CompositeType to have zero items
emcmanus
parents: 1015
diff changeset
   312
     * @throws RuntimeMBeanException {@inheritDoc}
4561ee1fb2b7 6405862: Allow CompositeType to have zero items
emcmanus
parents: 1015
diff changeset
   313
     * @throws RuntimeErrorException {@inheritDoc}
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   314
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
    public ObjectInstance createMBean(String className, ObjectName name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
                                      ObjectName loaderName, Object params[],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
                                      String signature[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
            throws ReflectionException, InstanceAlreadyExistsException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
                   MBeanRegistrationException, MBeanException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
                   NotCompliantMBeanException, InstanceNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
    /**
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   323
     * <p>Registers a pre-existing object as an MBean with the MBean
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   324
     * server. If the object name given is null, the MBean must
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   325
     * provide its own name by implementing the {@link
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
     * javax.management.MBeanRegistration MBeanRegistration} interface
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
     * and returning the name from the {@link
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   328
     * MBeanRegistration#preRegister preRegister} method.
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   329
     *
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   330
     * <p>If this method successfully registers an MBean, a notification
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   331
     * is sent as described <a href="#notif">above</a>.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
     * @param object The  MBean to be registered as an MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
     * @param name The object name of the MBean. May be null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
     * @return An <CODE>ObjectInstance</CODE>, containing the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
     * <CODE>ObjectName</CODE> and the Java class name of the newly
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
     * registered MBean.  If the contained <code>ObjectName</code>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
     * is <code>n</code>, the contained Java class name is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
     * <code>{@link #getMBeanInfo getMBeanInfo(n)}.getClassName()</code>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
     * @exception InstanceAlreadyExistsException The MBean is already
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
     * under the control of the MBean server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
     * @exception MBeanRegistrationException The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
     * <CODE>preRegister</CODE> (<CODE>MBeanRegistration</CODE>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
     * interface) method of the MBean has thrown an exception. The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
     * MBean will not be registered.
1002
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   348
     * @exception RuntimeMBeanException If the <CODE>postRegister</CODE>
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   349
     * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws a
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1156
diff changeset
   350
     * <CODE>RuntimeException</CODE>, the <CODE>registerMBean</CODE> method will
1002
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   351
     * throw a <CODE>RuntimeMBeanException</CODE>, although the MBean
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   352
     * registration succeeded. In such a case, the MBean will be actually
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1156
diff changeset
   353
     * registered even though the <CODE>registerMBean</CODE> method
1002
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   354
     * threw an exception.  Note that <CODE>RuntimeMBeanException</CODE> can
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   355
     * also be thrown by <CODE>preRegister</CODE>, in which case the MBean
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   356
     * will not be registered.
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   357
     * @exception RuntimeErrorException If the <CODE>postRegister</CODE>
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   358
     * (<CODE>MBeanRegistration</CODE> interface) method of the MBean throws an
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1156
diff changeset
   359
     * <CODE>Error</CODE>, the <CODE>registerMBean</CODE> method will
1002
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   360
     * throw a <CODE>RuntimeErrorException</CODE>, although the MBean
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   361
     * registration succeeded. In such a case, the MBean will be actually
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1156
diff changeset
   362
     * registered even though the <CODE>registerMBean</CODE> method
1002
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   363
     * threw an exception.  Note that <CODE>RuntimeErrorException</CODE> can
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   364
     * also be thrown by <CODE>preRegister</CODE>, in which case the MBean
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   365
     * will not be registered.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
     * @exception NotCompliantMBeanException This object is not a JMX
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
     * compliant MBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
     * @exception RuntimeOperationsException Wraps a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
     * <CODE>java.lang.IllegalArgumentException</CODE>: The object
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
     * passed in parameter is null or no object name is specified.
1002
1e6a1b77f22a 6730926: Document that create/registerMBean can throw RuntimeMBeanException from postRegister
dfuchs
parents: 834
diff changeset
   371
     * @see javax.management.MBeanRegistration
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
    public ObjectInstance registerMBean(Object object, ObjectName name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
            throws InstanceAlreadyExistsException, MBeanRegistrationException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
                   NotCompliantMBeanException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   377
    /**
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   378
     * {@inheritDoc}
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   379
     *
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   380
     * <p>If this method successfully unregisters an MBean, a notification
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   381
     * is sent as described <a href="#notif">above</a>.</p>
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   382
     *
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   383
     * @throws RuntimeOperationsException {@inheritDoc}
1513
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1156
diff changeset
   384
     * @throws RuntimeMBeanException {@inheritDoc}
d09513aaa9da 6252609: Two different default descriptor forms defined for ModelMBeanInfoSupport
emcmanus
parents: 1156
diff changeset
   385
     * @throws RuntimeErrorException {@inheritDoc}
267
d436a8afbbd3 6649542: Document explicitly in registerMBean etc that MBeanServerNotification is emitted
emcmanus
parents: 2
diff changeset
   386
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
    public void unregisterMBean(ObjectName name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
            throws InstanceNotFoundException, MBeanRegistrationException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
    // doc comment inherited from MBeanServerConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
    public ObjectInstance getObjectInstance(ObjectName name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
            throws InstanceNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
1709
392dd6db361a 6768935: Clarify the behaviour of ObjectName pattern matching with regards to namespaces
dfuchs
parents: 1705
diff changeset
   394
    /**
392dd6db361a 6768935: Clarify the behaviour of ObjectName pattern matching with regards to namespaces
dfuchs
parents: 1705
diff changeset
   395
     * {@inheritDoc}
392dd6db361a 6768935: Clarify the behaviour of ObjectName pattern matching with regards to namespaces
dfuchs
parents: 1705
diff changeset
   396
      * @throws RuntimeOperationsException {@inheritDoc}
392dd6db361a 6768935: Clarify the behaviour of ObjectName pattern matching with regards to namespaces
dfuchs
parents: 1705
diff changeset
   397
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
    public Set<ObjectInstance> queryMBeans(ObjectName name, QueryExp query);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
1709
392dd6db361a 6768935: Clarify the behaviour of ObjectName pattern matching with regards to namespaces
dfuchs
parents: 1705
diff changeset
   400
    /**
392dd6db361a 6768935: Clarify the behaviour of ObjectName pattern matching with regards to namespaces
dfuchs
parents: 1705
diff changeset
   401
     * {@inheritDoc}
392dd6db361a 6768935: Clarify the behaviour of ObjectName pattern matching with regards to namespaces
dfuchs
parents: 1705
diff changeset
   402
      * @throws RuntimeOperationsException {@inheritDoc}
392dd6db361a 6768935: Clarify the behaviour of ObjectName pattern matching with regards to namespaces
dfuchs
parents: 1705
diff changeset
   403
    */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    public Set<ObjectName> queryNames(ObjectName name, QueryExp query);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
    // doc comment inherited from MBeanServerConnection
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   407
    /**
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   408
     * @throws RuntimeOperationsException {@inheritDoc}
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   409
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   410
    public boolean isRegistered(ObjectName name);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   411
90ce3da70b43 Initial load
duke
parents:
diff changeset
   412
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   413
     * Returns the number of MBeans registered in the MBean server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   414
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   415
     * @return the number of registered MBeans, wrapped in an Integer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   416
     * If the caller's permissions are restricted, this number may
90ce3da70b43 Initial load
duke
parents:
diff changeset
   417
     * be greater than the number of MBeans the caller can access.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   418
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   419
    public Integer getMBeanCount();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   420
90ce3da70b43 Initial load
duke
parents:
diff changeset
   421
    // doc comment inherited from MBeanServerConnection
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   422
    /**
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   423
     * @throws RuntimeOperationsException {@inheritDoc}
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   424
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   425
    public Object getAttribute(ObjectName name, String attribute)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   426
            throws MBeanException, AttributeNotFoundException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   427
                   InstanceNotFoundException, ReflectionException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   428
90ce3da70b43 Initial load
duke
parents:
diff changeset
   429
    // doc comment inherited from MBeanServerConnection
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   430
    /**
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   431
     * @throws RuntimeOperationsException {@inheritDoc}
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   432
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   433
    public AttributeList getAttributes(ObjectName name, String[] attributes)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   434
            throws InstanceNotFoundException, ReflectionException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   435
90ce3da70b43 Initial load
duke
parents:
diff changeset
   436
    // doc comment inherited from MBeanServerConnection
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   437
    /**
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   438
     * @throws RuntimeOperationsException {@inheritDoc}
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   439
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   440
    public void setAttribute(ObjectName name, Attribute attribute)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   441
            throws InstanceNotFoundException, AttributeNotFoundException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   442
                   InvalidAttributeValueException, MBeanException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   443
                   ReflectionException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   444
90ce3da70b43 Initial load
duke
parents:
diff changeset
   445
    // doc comment inherited from MBeanServerConnection
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   446
    /**
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   447
     * @throws RuntimeOperationsException {@inheritDoc}
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   448
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   449
    public AttributeList setAttributes(ObjectName name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   450
                                       AttributeList attributes)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   451
        throws InstanceNotFoundException, ReflectionException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   452
90ce3da70b43 Initial load
duke
parents:
diff changeset
   453
    // doc comment inherited from MBeanServerConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   454
    public Object invoke(ObjectName name, String operationName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   455
                         Object params[], String signature[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   456
            throws InstanceNotFoundException, MBeanException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   457
                   ReflectionException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   458
90ce3da70b43 Initial load
duke
parents:
diff changeset
   459
    // doc comment inherited from MBeanServerConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   460
    public String getDefaultDomain();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   461
90ce3da70b43 Initial load
duke
parents:
diff changeset
   462
    // doc comment inherited from MBeanServerConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   463
    public String[] getDomains();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   464
1004
5ba8217eb504 5108776: Add reliable event handling to the JMX API
sjiang
parents: 1002
diff changeset
   465
    // doc comment inherited from MBeanServerConnection, plus:
5ba8217eb504 5108776: Add reliable event handling to the JMX API
sjiang
parents: 1002
diff changeset
   466
    /**
5ba8217eb504 5108776: Add reliable event handling to the JMX API
sjiang
parents: 1002
diff changeset
   467
     * {@inheritDoc}
5ba8217eb504 5108776: Add reliable event handling to the JMX API
sjiang
parents: 1002
diff changeset
   468
     * If the source of the notification
5ba8217eb504 5108776: Add reliable event handling to the JMX API
sjiang
parents: 1002
diff changeset
   469
     * is a reference to an MBean object, the MBean server will replace it
5ba8217eb504 5108776: Add reliable event handling to the JMX API
sjiang
parents: 1002
diff changeset
   470
     * by that MBean's ObjectName.  Otherwise the source is unchanged.
5ba8217eb504 5108776: Add reliable event handling to the JMX API
sjiang
parents: 1002
diff changeset
   471
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   472
    public void addNotificationListener(ObjectName name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   473
                                        NotificationListener listener,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   474
                                        NotificationFilter filter,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   475
                                        Object handback)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   476
            throws InstanceNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   477
1015
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   478
    /**
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   479
     * {@inheritDoc}
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   480
     * @throws RuntimeOperationsException {@inheritDoc}
98e761716380 6717257: MBeanServer doesn't describe RuntimeException for methods inherited from MBeanServerConnection
emcmanus
parents: 1004
diff changeset
   481
     */
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   482
    public void addNotificationListener(ObjectName name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   483
                                        ObjectName listener,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   484
                                        NotificationFilter filter,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   485
                                        Object handback)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   486
            throws InstanceNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   487
90ce3da70b43 Initial load
duke
parents:
diff changeset
   488
    // doc comment inherited from MBeanServerConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   489
    public void removeNotificationListener(ObjectName name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   490
                                           ObjectName listener)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   491
        throws InstanceNotFoundException, ListenerNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   492
90ce3da70b43 Initial load
duke
parents:
diff changeset
   493
    // doc comment inherited from MBeanServerConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   494
    public void removeNotificationListener(ObjectName name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   495
                                           ObjectName listener,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   496
                                           NotificationFilter filter,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   497
                                           Object handback)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   498
            throws InstanceNotFoundException, ListenerNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   499
90ce3da70b43 Initial load
duke
parents:
diff changeset
   500
    // doc comment inherited from MBeanServerConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   501
    public void removeNotificationListener(ObjectName name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   502
                                           NotificationListener listener)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   503
            throws InstanceNotFoundException, ListenerNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   504
90ce3da70b43 Initial load
duke
parents:
diff changeset
   505
    // doc comment inherited from MBeanServerConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   506
    public void removeNotificationListener(ObjectName name,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   507
                                           NotificationListener listener,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   508
                                           NotificationFilter filter,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   509
                                           Object handback)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   510
            throws InstanceNotFoundException, ListenerNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   511
90ce3da70b43 Initial load
duke
parents:
diff changeset
   512
    // doc comment inherited from MBeanServerConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   513
    public MBeanInfo getMBeanInfo(ObjectName name)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   514
            throws InstanceNotFoundException, IntrospectionException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   515
                   ReflectionException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   516
90ce3da70b43 Initial load
duke
parents:
diff changeset
   517
90ce3da70b43 Initial load
duke
parents:
diff changeset
   518
    // doc comment inherited from MBeanServerConnection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   519
    public boolean isInstanceOf(ObjectName name, String className)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   520
            throws InstanceNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   521
90ce3da70b43 Initial load
duke
parents:
diff changeset
   522
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   523
     * <p>Instantiates an object using the list of all class loaders
90ce3da70b43 Initial load
duke
parents:
diff changeset
   524
     * registered in the MBean server's {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   525
     * javax.management.loading.ClassLoaderRepository Class Loader
90ce3da70b43 Initial load
duke
parents:
diff changeset
   526
     * Repository}.  The object's class should have a public
90ce3da70b43 Initial load
duke
parents:
diff changeset
   527
     * constructor.  This method returns a reference to the newly
90ce3da70b43 Initial load
duke
parents:
diff changeset
   528
     * created object.  The newly created object is not registered in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   529
     * the MBean server.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   530
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   531
     * <p>This method is equivalent to {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   532
     * #instantiate(String,Object[],String[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   533
     * instantiate(className, (Object[]) null, (String[]) null)}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   534
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   535
     * @param className The class name of the object to be instantiated.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   536
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   537
     * @return The newly instantiated object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   538
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   539
     * @exception ReflectionException Wraps a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   540
     * <CODE>java.lang.ClassNotFoundException</CODE> or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   541
     * <CODE>java.lang.Exception</CODE> that occurred when trying to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   542
     * invoke the object's constructor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   543
     * @exception MBeanException The constructor of the object has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   544
     * thrown an exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   545
     * @exception RuntimeOperationsException Wraps a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   546
     * <CODE>java.lang.IllegalArgumentException</CODE>: The className
90ce3da70b43 Initial load
duke
parents:
diff changeset
   547
     * passed in parameter is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   548
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   549
    public Object instantiate(String className)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   550
            throws ReflectionException, MBeanException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   551
90ce3da70b43 Initial load
duke
parents:
diff changeset
   552
90ce3da70b43 Initial load
duke
parents:
diff changeset
   553
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   554
     * <p>Instantiates an object using the class Loader specified by its
90ce3da70b43 Initial load
duke
parents:
diff changeset
   555
     * <CODE>ObjectName</CODE>.  If the loader name is null, the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   556
     * ClassLoader that loaded the MBean Server will be used.  The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   557
     * object's class should have a public constructor.  This method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   558
     * returns a reference to the newly created object.  The newly
90ce3da70b43 Initial load
duke
parents:
diff changeset
   559
     * created object is not registered in the MBean server.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   560
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   561
     * <p>This method is equivalent to {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   562
     * #instantiate(String,ObjectName,Object[],String[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   563
     * instantiate(className, loaderName, (Object[]) null, (String[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   564
     * null)}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   565
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   566
     * @param className The class name of the MBean to be instantiated.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   567
     * @param loaderName The object name of the class loader to be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   568
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   569
     * @return The newly instantiated object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   570
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   571
     * @exception ReflectionException Wraps a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   572
     * <CODE>java.lang.ClassNotFoundException</CODE> or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   573
     * <CODE>java.lang.Exception</CODE> that occurred when trying to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   574
     * invoke the object's constructor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   575
     * @exception MBeanException The constructor of the object has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   576
     * thrown an exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   577
     * @exception InstanceNotFoundException The specified class loader
90ce3da70b43 Initial load
duke
parents:
diff changeset
   578
     * is not registered in the MBeanServer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   579
     * @exception RuntimeOperationsException Wraps a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   580
     * <CODE>java.lang.IllegalArgumentException</CODE>: The className
90ce3da70b43 Initial load
duke
parents:
diff changeset
   581
     * passed in parameter is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   582
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   583
    public Object instantiate(String className, ObjectName loaderName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   584
            throws ReflectionException, MBeanException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   585
                   InstanceNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   586
90ce3da70b43 Initial load
duke
parents:
diff changeset
   587
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   588
     * <p>Instantiates an object using the list of all class loaders
90ce3da70b43 Initial load
duke
parents:
diff changeset
   589
     * registered in the MBean server {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   590
     * javax.management.loading.ClassLoaderRepository Class Loader
90ce3da70b43 Initial load
duke
parents:
diff changeset
   591
     * Repository}.  The object's class should have a public
90ce3da70b43 Initial load
duke
parents:
diff changeset
   592
     * constructor.  The call returns a reference to the newly created
90ce3da70b43 Initial load
duke
parents:
diff changeset
   593
     * object.  The newly created object is not registered in the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   594
     * MBean server.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   595
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   596
     * @param className The class name of the object to be instantiated.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   597
     * @param params An array containing the parameters of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   598
     * constructor to be invoked.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   599
     * @param signature An array containing the signature of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   600
     * constructor to be invoked.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   601
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   602
     * @return The newly instantiated object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   603
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   604
     * @exception ReflectionException Wraps a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   605
     * <CODE>java.lang.ClassNotFoundException</CODE> or the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   606
     * <CODE>java.lang.Exception</CODE> that occurred when trying to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   607
     * invoke the object's constructor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   608
     * @exception MBeanException The constructor of the object has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   609
     * thrown an exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   610
     * @exception RuntimeOperationsException Wraps a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   611
     * <CODE>java.lang.IllegalArgumentException</CODE>: The className
90ce3da70b43 Initial load
duke
parents:
diff changeset
   612
     * passed in parameter is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   613
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   614
    public Object instantiate(String className, Object params[],
90ce3da70b43 Initial load
duke
parents:
diff changeset
   615
                              String signature[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   616
            throws ReflectionException, MBeanException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   617
90ce3da70b43 Initial load
duke
parents:
diff changeset
   618
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   619
     * <p>Instantiates an object. The class loader to be used is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   620
     * identified by its object name. If the object name of the loader
90ce3da70b43 Initial load
duke
parents:
diff changeset
   621
     * is null, the ClassLoader that loaded the MBean server will be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   622
     * used.  The object's class should have a public constructor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   623
     * The call returns a reference to the newly created object.  The
90ce3da70b43 Initial load
duke
parents:
diff changeset
   624
     * newly created object is not registered in the MBean server.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   625
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   626
     * @param className The class name of the object to be instantiated.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   627
     * @param params An array containing the parameters of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   628
     * constructor to be invoked.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   629
     * @param signature An array containing the signature of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   630
     * constructor to be invoked.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   631
     * @param loaderName The object name of the class loader to be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   632
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   633
     * @return The newly instantiated object.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   634
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   635
     * @exception ReflectionException Wraps a <CODE>java.lang.ClassNotFoundException</CODE> or the <CODE>java.lang.Exception</CODE> that
90ce3da70b43 Initial load
duke
parents:
diff changeset
   636
     * occurred when trying to invoke the object's constructor.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   637
     * @exception MBeanException The constructor of the object has
90ce3da70b43 Initial load
duke
parents:
diff changeset
   638
     * thrown an exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   639
     * @exception InstanceNotFoundException The specified class loader
90ce3da70b43 Initial load
duke
parents:
diff changeset
   640
     * is not registered in the MBean server.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   641
     * @exception RuntimeOperationsException Wraps a
90ce3da70b43 Initial load
duke
parents:
diff changeset
   642
     * <CODE>java.lang.IllegalArgumentException</CODE>: The className
90ce3da70b43 Initial load
duke
parents:
diff changeset
   643
     * passed in parameter is null.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   644
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   645
    public Object instantiate(String className, ObjectName loaderName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   646
                              Object params[], String signature[])
90ce3da70b43 Initial load
duke
parents:
diff changeset
   647
            throws ReflectionException, MBeanException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   648
                   InstanceNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   649
90ce3da70b43 Initial load
duke
parents:
diff changeset
   650
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   651
     * <p>De-serializes a byte array in the context of the class loader
90ce3da70b43 Initial load
duke
parents:
diff changeset
   652
     * of an MBean.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   653
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   654
     * @param name The name of the MBean whose class loader should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   655
     * used for the de-serialization.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   656
     * @param data The byte array to be de-sererialized.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   657
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   658
     * @return The de-serialized object stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   659
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   660
     * @exception InstanceNotFoundException The MBean specified is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   661
     * found.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   662
     * @exception OperationsException Any of the usual Input/Output
90ce3da70b43 Initial load
duke
parents:
diff changeset
   663
     * related exceptions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   664
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   665
     * @deprecated Use {@link #getClassLoaderFor getClassLoaderFor} to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   666
     * obtain the appropriate class loader for deserialization.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   667
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   668
    @Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   669
    public ObjectInputStream deserialize(ObjectName name, byte[] data)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   670
            throws InstanceNotFoundException, OperationsException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   671
90ce3da70b43 Initial load
duke
parents:
diff changeset
   672
90ce3da70b43 Initial load
duke
parents:
diff changeset
   673
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   674
     * <p>De-serializes a byte array in the context of a given MBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   675
     * class loader.  The class loader is found by loading the class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   676
     * <code>className</code> through the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   677
     * javax.management.loading.ClassLoaderRepository Class Loader
90ce3da70b43 Initial load
duke
parents:
diff changeset
   678
     * Repository}.  The resultant class's class loader is the one to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   679
     * use.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   680
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   681
     * @param className The name of the class whose class loader should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   682
     * used for the de-serialization.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   683
     * @param data The byte array to be de-sererialized.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   684
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   685
     * @return  The de-serialized object stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   686
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   687
     * @exception OperationsException Any of the usual Input/Output
90ce3da70b43 Initial load
duke
parents:
diff changeset
   688
     * related exceptions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   689
     * @exception ReflectionException The specified class could not be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   690
     * loaded by the class loader repository
90ce3da70b43 Initial load
duke
parents:
diff changeset
   691
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   692
     * @deprecated Use {@link #getClassLoaderRepository} to obtain the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   693
     * class loader repository and use it to deserialize.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   694
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   695
    @Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   696
    public ObjectInputStream deserialize(String className, byte[] data)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   697
            throws OperationsException, ReflectionException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   698
90ce3da70b43 Initial load
duke
parents:
diff changeset
   699
90ce3da70b43 Initial load
duke
parents:
diff changeset
   700
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   701
     * <p>De-serializes a byte array in the context of a given MBean
90ce3da70b43 Initial load
duke
parents:
diff changeset
   702
     * class loader.  The class loader is the one that loaded the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   703
     * class with name "className".  The name of the class loader to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   704
     * be used for loading the specified class is specified.  If null,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   705
     * the MBean Server's class loader will be used.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   706
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   707
     * @param className The name of the class whose class loader should be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   708
     * used for the de-serialization.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   709
     * @param data The byte array to be de-sererialized.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   710
     * @param loaderName The name of the class loader to be used for
90ce3da70b43 Initial load
duke
parents:
diff changeset
   711
     * loading the specified class.  If null, the MBean Server's class
90ce3da70b43 Initial load
duke
parents:
diff changeset
   712
     * loader will be used.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   713
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   714
     * @return  The de-serialized object stream.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   715
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   716
     * @exception InstanceNotFoundException The specified class loader
90ce3da70b43 Initial load
duke
parents:
diff changeset
   717
     * MBean is not found.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   718
     * @exception OperationsException Any of the usual Input/Output
90ce3da70b43 Initial load
duke
parents:
diff changeset
   719
     * related exceptions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   720
     * @exception ReflectionException The specified class could not be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   721
     * loaded by the specified class loader.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   722
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   723
     * @deprecated Use {@link #getClassLoader getClassLoader} to obtain
90ce3da70b43 Initial load
duke
parents:
diff changeset
   724
     * the class loader for deserialization.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   725
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   726
    @Deprecated
90ce3da70b43 Initial load
duke
parents:
diff changeset
   727
    public ObjectInputStream deserialize(String className,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   728
                                         ObjectName loaderName,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   729
                                         byte[] data)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   730
            throws InstanceNotFoundException, OperationsException,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   731
                   ReflectionException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   732
90ce3da70b43 Initial load
duke
parents:
diff changeset
   733
    /**
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   734
     * <p>Return the {@link java.lang.ClassLoader} that was used for
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   735
     * loading the class of the named MBean.</p>
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   736
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   737
     * @param mbeanName The ObjectName of the MBean.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   738
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   739
     * @return The ClassLoader used for that MBean.  If <var>l</var>
4156
acaa49a2768a 6851617: Remove JSR 255 (JMX API 2.0) from JDK 7
emcmanus
parents: 1709
diff changeset
   740
     * is the MBean's actual ClassLoader, and <var>r</var> is the
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   741
     * returned value, then either:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   742
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   743
     * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   744
     * <li><var>r</var> is identical to <var>l</var>; or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   745
     * <li>the result of <var>r</var>{@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   746
     * ClassLoader#loadClass(String) .loadClass(<var>s</var>)} is the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   747
     * same as <var>l</var>{@link ClassLoader#loadClass(String)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   748
     * .loadClass(<var>s</var>)} for any string <var>s</var>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   749
     * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   750
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   751
     * What this means is that the ClassLoader may be wrapped in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   752
     * another ClassLoader for security or other reasons.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   753
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   754
     * @exception InstanceNotFoundException if the named MBean is not found.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   755
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   756
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   757
    public ClassLoader getClassLoaderFor(ObjectName mbeanName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   758
        throws InstanceNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   759
90ce3da70b43 Initial load
duke
parents:
diff changeset
   760
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   761
     * <p>Return the named {@link java.lang.ClassLoader}.</p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   762
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   763
     * @param loaderName The ObjectName of the ClassLoader.  May be
90ce3da70b43 Initial load
duke
parents:
diff changeset
   764
     * null, in which case the MBean server's own ClassLoader is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   765
     * returned.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   766
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   767
     * @return The named ClassLoader.  If <var>l</var> is the actual
90ce3da70b43 Initial load
duke
parents:
diff changeset
   768
     * ClassLoader with that name, and <var>r</var> is the returned
90ce3da70b43 Initial load
duke
parents:
diff changeset
   769
     * value, then either:
90ce3da70b43 Initial load
duke
parents:
diff changeset
   770
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   771
     * <ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   772
     * <li><var>r</var> is identical to <var>l</var>; or
90ce3da70b43 Initial load
duke
parents:
diff changeset
   773
     * <li>the result of <var>r</var>{@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
   774
     * ClassLoader#loadClass(String) .loadClass(<var>s</var>)} is the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   775
     * same as <var>l</var>{@link ClassLoader#loadClass(String)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   776
     * .loadClass(<var>s</var>)} for any string <var>s</var>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   777
     * </ul>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   778
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   779
     * What this means is that the ClassLoader may be wrapped in
90ce3da70b43 Initial load
duke
parents:
diff changeset
   780
     * another ClassLoader for security or other reasons.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   781
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   782
     * @exception InstanceNotFoundException if the named ClassLoader is
90ce3da70b43 Initial load
duke
parents:
diff changeset
   783
     *    not found.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   784
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   785
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   786
    public ClassLoader getClassLoader(ObjectName loaderName)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   787
        throws InstanceNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   788
90ce3da70b43 Initial load
duke
parents:
diff changeset
   789
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   790
     * <p>Return the ClassLoaderRepository for this MBeanServer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   791
     * @return The ClassLoaderRepository for this MBeanServer.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   792
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   793
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   794
    public ClassLoaderRepository getClassLoaderRepository();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   795
}