author | emcmanus |
Fri, 07 Nov 2008 11:48:07 +0100 | |
changeset 1570 | 4165709c91e3 |
parent 1222 | 78e3d021d528 |
permissions | -rw-r--r-- |
1156
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
1 |
/* |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
2 |
* Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
4 |
* |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Sun designates this |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
9 |
* by Sun in the LICENSE file that accompanied this code. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
10 |
* |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
15 |
* accompanied this code). |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
16 |
* |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
20 |
* |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
21 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
22 |
* CA 95054 USA or visit www.sun.com if you need additional information or |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
23 |
* have any questions. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
24 |
*/ |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
25 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
26 |
package com.sun.jmx.namespace; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
27 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
28 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
29 |
import com.sun.jmx.mbeanserver.Util; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
30 |
import java.io.IOException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
31 |
import java.io.ObjectInputStream; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
32 |
import java.lang.reflect.UndeclaredThrowableException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
33 |
import java.util.Collections; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
34 |
import java.util.Set; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
35 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
36 |
import javax.management.Attribute; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
37 |
import javax.management.AttributeList; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
38 |
import javax.management.AttributeNotFoundException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
39 |
import javax.management.InstanceAlreadyExistsException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
40 |
import javax.management.InstanceNotFoundException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
41 |
import javax.management.IntrospectionException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
42 |
import javax.management.InvalidAttributeValueException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
43 |
import javax.management.ListenerNotFoundException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
44 |
import javax.management.MBeanException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
45 |
import javax.management.MBeanInfo; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
46 |
import javax.management.MBeanRegistrationException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
47 |
import javax.management.MBeanServer; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
48 |
import javax.management.NotCompliantMBeanException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
49 |
import javax.management.NotificationFilter; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
50 |
import javax.management.NotificationListener; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
51 |
import javax.management.ObjectInstance; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
52 |
import javax.management.ObjectName; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
53 |
import javax.management.OperationsException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
54 |
import javax.management.QueryExp; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
55 |
import javax.management.ReflectionException; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
56 |
import javax.management.loading.ClassLoaderRepository; |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
57 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
58 |
/** |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
59 |
* A RoutingServerProxy is an MBeanServer proxy that proxies a |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
60 |
* source name space in a source MBeanServer. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
61 |
* It wraps a source MBeanServer, and rewrites routing ObjectNames. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
62 |
* It is typically use for implementing 'cd' operations, and |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
63 |
* will add the source name space to routing ObjectNames at input, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
64 |
* and remove it at output. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
65 |
* <p><b> |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
66 |
* This API is a Sun internal API and is subject to changes without notice. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
67 |
* </b></p> |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
68 |
* |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
69 |
* @since 1.7 |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
70 |
*/ |
1222
78e3d021d528
6745832: jmx namespaces: Some refactoring/commenting would improve code readability.
dfuchs
parents:
1156
diff
changeset
|
71 |
// See class hierarchy and detailled explanations in RoutingProxy in this |
78e3d021d528
6745832: jmx namespaces: Some refactoring/commenting would improve code readability.
dfuchs
parents:
1156
diff
changeset
|
72 |
// package. |
78e3d021d528
6745832: jmx namespaces: Some refactoring/commenting would improve code readability.
dfuchs
parents:
1156
diff
changeset
|
73 |
// |
1156
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
74 |
public class RoutingServerProxy |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
75 |
extends RoutingProxy<MBeanServer> |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
76 |
implements MBeanServer { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
77 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
78 |
public RoutingServerProxy(MBeanServer source, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
79 |
String sourceNs, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
80 |
String targetNs, |
1570
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1222
diff
changeset
|
81 |
boolean probe) { |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1222
diff
changeset
|
82 |
super(source, sourceNs, targetNs, probe); |
1156
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
83 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
84 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
85 |
/** |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
86 |
* This method is called each time an IOException is raised when |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
87 |
* trying to forward an operation to the underlying |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
88 |
* MBeanServerConnection, as a result of calling |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
89 |
* {@link #getMBeanServerConnection()} or as a result of invoking the |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
90 |
* operation on the returned connection. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
91 |
* Subclasses may redefine this method if they need to perform any |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
92 |
* specific handling of IOException (logging etc...). |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
93 |
* @param x The raised IOException. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
94 |
* @param method The name of the method in which the exception was |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
95 |
* raised. This is one of the methods of the MBeanServer |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
96 |
* interface. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
97 |
* @return A RuntimeException that should be thrown by the caller. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
98 |
* In this default implementation, this is an |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
99 |
* {@link UndeclaredThrowableException} wrapping <var>x</var>. |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
100 |
**/ |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
101 |
protected RuntimeException handleIOException(IOException x, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
102 |
String method) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
103 |
return Util.newRuntimeIOException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
104 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
105 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
106 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
107 |
//-------------------------------------------- |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
108 |
//-------------------------------------------- |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
109 |
// |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
110 |
// Implementation of the MBeanServer interface |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
111 |
// |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
112 |
//-------------------------------------------- |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
113 |
//-------------------------------------------- |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
114 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
115 |
public void addNotificationListener(ObjectName name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
116 |
NotificationListener listener, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
117 |
NotificationFilter filter, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
118 |
Object handback) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
119 |
throws InstanceNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
120 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
121 |
super.addNotificationListener(name, listener, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
122 |
filter, handback); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
123 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
124 |
throw handleIOException(x,"addNotificationListener"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
125 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
126 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
127 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
128 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
129 |
public void addNotificationListener(ObjectName name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
130 |
ObjectName listener, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
131 |
NotificationFilter filter, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
132 |
Object handback) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
133 |
throws InstanceNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
134 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
135 |
super.addNotificationListener(name, listener, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
136 |
filter, handback); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
137 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
138 |
throw handleIOException(x,"addNotificationListener"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
139 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
140 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
141 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
142 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
143 |
public ObjectInstance createMBean(String className, ObjectName name) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
144 |
throws |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
145 |
ReflectionException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
146 |
InstanceAlreadyExistsException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
147 |
MBeanRegistrationException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
148 |
MBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
149 |
NotCompliantMBeanException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
150 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
151 |
return super.createMBean(className, name); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
152 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
153 |
throw handleIOException(x,"createMBean"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
154 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
155 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
156 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
157 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
158 |
public ObjectInstance createMBean(String className, ObjectName name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
159 |
Object params[], String signature[]) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
160 |
throws |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
161 |
ReflectionException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
162 |
InstanceAlreadyExistsException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
163 |
MBeanRegistrationException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
164 |
MBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
165 |
NotCompliantMBeanException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
166 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
167 |
return super.createMBean(className, name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
168 |
params, signature); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
169 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
170 |
throw handleIOException(x,"createMBean"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
171 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
172 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
173 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
174 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
175 |
public ObjectInstance createMBean(String className, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
176 |
ObjectName name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
177 |
ObjectName loaderName) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
178 |
throws |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
179 |
ReflectionException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
180 |
InstanceAlreadyExistsException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
181 |
MBeanRegistrationException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
182 |
MBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
183 |
NotCompliantMBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
184 |
InstanceNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
185 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
186 |
return super.createMBean(className, name, loaderName); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
187 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
188 |
throw handleIOException(x,"createMBean"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
189 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
190 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
191 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
192 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
193 |
public ObjectInstance createMBean(String className, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
194 |
ObjectName name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
195 |
ObjectName loaderName, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
196 |
Object params[], |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
197 |
String signature[]) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
198 |
throws |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
199 |
ReflectionException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
200 |
InstanceAlreadyExistsException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
201 |
MBeanRegistrationException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
202 |
MBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
203 |
NotCompliantMBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
204 |
InstanceNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
205 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
206 |
return super.createMBean(className, name, loaderName, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
207 |
params, signature); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
208 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
209 |
throw handleIOException(x,"createMBean"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
210 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
211 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
212 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
213 |
/** |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
214 |
* @deprecated see {@link MBeanServer#deserialize(ObjectName,byte[]) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
215 |
* MBeanServer} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
216 |
**/ |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
217 |
@Deprecated |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
218 |
public ObjectInputStream deserialize(ObjectName name, byte[] data) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
219 |
throws InstanceNotFoundException, OperationsException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
220 |
final ObjectName sourceName = toSourceOrRuntime(name); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
221 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
222 |
return source().deserialize(sourceName,data); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
223 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
224 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
225 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
226 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
227 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
228 |
/** |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
229 |
* @deprecated see {@link MBeanServer#deserialize(String,byte[]) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
230 |
* MBeanServer} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
231 |
*/ |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
232 |
@Deprecated |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
233 |
public ObjectInputStream deserialize(String className, byte[] data) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
234 |
throws OperationsException, ReflectionException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
235 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
236 |
return source().deserialize(className,data); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
237 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
238 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
239 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
240 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
241 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
242 |
/** |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
243 |
* @deprecated see {@link MBeanServer#deserialize(String,ObjectName,byte[]) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
244 |
* MBeanServer} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
245 |
*/ |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
246 |
@Deprecated |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
247 |
public ObjectInputStream deserialize(String className, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
248 |
ObjectName loaderName, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
249 |
byte[] data) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
250 |
throws |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
251 |
InstanceNotFoundException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
252 |
OperationsException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
253 |
ReflectionException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
254 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
255 |
return source().deserialize(className,loaderName,data); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
256 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
257 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
258 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
259 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
260 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
261 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
262 |
public Object getAttribute(ObjectName name, String attribute) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
263 |
throws |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
264 |
MBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
265 |
AttributeNotFoundException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
266 |
InstanceNotFoundException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
267 |
ReflectionException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
268 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
269 |
return super.getAttribute(name, attribute); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
270 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
271 |
throw handleIOException(x,"getAttribute"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
272 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
273 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
274 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
275 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
276 |
public AttributeList getAttributes(ObjectName name, String[] attributes) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
277 |
throws InstanceNotFoundException, ReflectionException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
278 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
279 |
return super.getAttributes(name, attributes); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
280 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
281 |
throw handleIOException(x,"getAttributes"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
282 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
283 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
284 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
285 |
public ClassLoader getClassLoader(ObjectName loaderName) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
286 |
throws InstanceNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
287 |
final ObjectName sourceName = toSourceOrRuntime(loaderName); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
288 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
289 |
return source().getClassLoader(sourceName); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
290 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
291 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
292 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
293 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
294 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
295 |
public ClassLoader getClassLoaderFor(ObjectName mbeanName) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
296 |
throws InstanceNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
297 |
final ObjectName sourceName = toSourceOrRuntime(mbeanName); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
298 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
299 |
return source().getClassLoaderFor(sourceName); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
300 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
301 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
302 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
303 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
304 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
305 |
public ClassLoaderRepository getClassLoaderRepository() { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
306 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
307 |
return source().getClassLoaderRepository(); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
308 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
309 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
310 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
311 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
312 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
313 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
314 |
public String getDefaultDomain() { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
315 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
316 |
return super.getDefaultDomain(); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
317 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
318 |
throw handleIOException(x,"getDefaultDomain"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
319 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
320 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
321 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
322 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
323 |
public String[] getDomains() { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
324 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
325 |
return super.getDomains(); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
326 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
327 |
throw handleIOException(x,"getDomains"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
328 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
329 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
330 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
331 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
332 |
public Integer getMBeanCount() { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
333 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
334 |
return super.getMBeanCount(); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
335 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
336 |
throw handleIOException(x,"getMBeanCount"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
337 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
338 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
339 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
340 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
341 |
public MBeanInfo getMBeanInfo(ObjectName name) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
342 |
throws |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
343 |
InstanceNotFoundException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
344 |
IntrospectionException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
345 |
ReflectionException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
346 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
347 |
return super.getMBeanInfo(name); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
348 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
349 |
throw handleIOException(x,"getMBeanInfo"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
350 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
351 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
352 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
353 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
354 |
public ObjectInstance getObjectInstance(ObjectName name) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
355 |
throws InstanceNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
356 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
357 |
return super.getObjectInstance(name); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
358 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
359 |
throw handleIOException(x,"getObjectInstance"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
360 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
361 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
362 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
363 |
public Object instantiate(String className) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
364 |
throws ReflectionException, MBeanException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
365 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
366 |
return source().instantiate(className); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
367 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
368 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
369 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
370 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
371 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
372 |
public Object instantiate(String className, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
373 |
Object params[], |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
374 |
String signature[]) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
375 |
throws ReflectionException, MBeanException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
376 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
377 |
return source().instantiate(className, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
378 |
params,signature); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
379 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
380 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
381 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
382 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
383 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
384 |
public Object instantiate(String className, ObjectName loaderName) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
385 |
throws ReflectionException, MBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
386 |
InstanceNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
387 |
final ObjectName srcLoaderName = toSourceOrRuntime(loaderName); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
388 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
389 |
return source().instantiate(className,srcLoaderName); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
390 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
391 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
392 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
393 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
394 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
395 |
public Object instantiate(String className, ObjectName loaderName, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
396 |
Object params[], String signature[]) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
397 |
throws ReflectionException, MBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
398 |
InstanceNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
399 |
final ObjectName srcLoaderName = toSourceOrRuntime(loaderName); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
400 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
401 |
return source().instantiate(className,srcLoaderName, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
402 |
params,signature); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
403 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
404 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
405 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
406 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
407 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
408 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
409 |
public Object invoke(ObjectName name, String operationName, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
410 |
Object params[], String signature[]) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
411 |
throws |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
412 |
InstanceNotFoundException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
413 |
MBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
414 |
ReflectionException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
415 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
416 |
return super.invoke(name,operationName,params,signature); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
417 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
418 |
throw handleIOException(x,"invoke"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
419 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
420 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
421 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
422 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
423 |
public boolean isInstanceOf(ObjectName name, String className) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
424 |
throws InstanceNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
425 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
426 |
return super.isInstanceOf(name, className); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
427 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
428 |
throw handleIOException(x,"isInstanceOf"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
429 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
430 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
431 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
432 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
433 |
public boolean isRegistered(ObjectName name) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
434 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
435 |
return super.isRegistered(name); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
436 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
437 |
throw handleIOException(x,"isRegistered"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
438 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
439 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
440 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
441 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
442 |
public Set<ObjectInstance> queryMBeans(ObjectName name, QueryExp query) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
443 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
444 |
return super.queryMBeans(name, query); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
445 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
446 |
handleIOException(x,"queryMBeans"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
447 |
return Collections.emptySet(); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
448 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
449 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
450 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
451 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
452 |
public Set<ObjectName> queryNames(ObjectName name, QueryExp query) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
453 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
454 |
return super.queryNames(name, query); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
455 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
456 |
handleIOException(x,"queryNames"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
457 |
return Collections.emptySet(); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
458 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
459 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
460 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
461 |
public ObjectInstance registerMBean(Object object, ObjectName name) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
462 |
throws |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
463 |
InstanceAlreadyExistsException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
464 |
MBeanRegistrationException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
465 |
NotCompliantMBeanException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
466 |
final ObjectName sourceName = newSourceMBeanName(name); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
467 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
468 |
return processOutputInstance( |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
469 |
source().registerMBean(object,sourceName)); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
470 |
} catch (RuntimeException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
471 |
throw makeCompliantRuntimeException(x); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
472 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
473 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
474 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
475 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
476 |
public void removeNotificationListener(ObjectName name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
477 |
NotificationListener listener) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
478 |
throws InstanceNotFoundException, ListenerNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
479 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
480 |
super.removeNotificationListener(name, listener); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
481 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
482 |
throw handleIOException(x,"removeNotificationListener"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
483 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
484 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
485 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
486 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
487 |
public void removeNotificationListener(ObjectName name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
488 |
NotificationListener listener, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
489 |
NotificationFilter filter, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
490 |
Object handback) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
491 |
throws InstanceNotFoundException, ListenerNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
492 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
493 |
super.removeNotificationListener(name, listener, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
494 |
filter, handback); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
495 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
496 |
throw handleIOException(x,"removeNotificationListener"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
497 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
498 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
499 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
500 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
501 |
public void removeNotificationListener(ObjectName name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
502 |
ObjectName listener) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
503 |
throws InstanceNotFoundException, ListenerNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
504 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
505 |
super.removeNotificationListener(name, listener); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
506 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
507 |
throw handleIOException(x,"removeNotificationListener"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
508 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
509 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
510 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
511 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
512 |
public void removeNotificationListener(ObjectName name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
513 |
ObjectName listener, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
514 |
NotificationFilter filter, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
515 |
Object handback) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
516 |
throws InstanceNotFoundException, ListenerNotFoundException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
517 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
518 |
super.removeNotificationListener(name, listener, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
519 |
filter, handback); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
520 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
521 |
throw handleIOException(x,"removeNotificationListener"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
522 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
523 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
524 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
525 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
526 |
public void setAttribute(ObjectName name, Attribute attribute) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
527 |
throws |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
528 |
InstanceNotFoundException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
529 |
AttributeNotFoundException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
530 |
InvalidAttributeValueException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
531 |
MBeanException, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
532 |
ReflectionException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
533 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
534 |
super.setAttribute(name, attribute); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
535 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
536 |
throw handleIOException(x,"setAttribute"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
537 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
538 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
539 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
540 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
541 |
public AttributeList setAttributes(ObjectName name, |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
542 |
AttributeList attributes) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
543 |
throws InstanceNotFoundException, ReflectionException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
544 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
545 |
return super.setAttributes(name, attributes); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
546 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
547 |
throw handleIOException(x,"setAttributes"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
548 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
549 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
550 |
|
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
551 |
@Override |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
552 |
public void unregisterMBean(ObjectName name) |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
553 |
throws InstanceNotFoundException, MBeanRegistrationException { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
554 |
try { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
555 |
super.unregisterMBean(name); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
556 |
} catch (IOException x) { |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
557 |
throw handleIOException(x,"unregisterMBean"); |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
558 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
559 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
560 |
|
1222
78e3d021d528
6745832: jmx namespaces: Some refactoring/commenting would improve code readability.
dfuchs
parents:
1156
diff
changeset
|
561 |
static final RoutingProxyFactory<MBeanServer,RoutingServerProxy> |
78e3d021d528
6745832: jmx namespaces: Some refactoring/commenting would improve code readability.
dfuchs
parents:
1156
diff
changeset
|
562 |
FACTORY = new RoutingProxyFactory<MBeanServer,RoutingServerProxy>() { |
78e3d021d528
6745832: jmx namespaces: Some refactoring/commenting would improve code readability.
dfuchs
parents:
1156
diff
changeset
|
563 |
|
78e3d021d528
6745832: jmx namespaces: Some refactoring/commenting would improve code readability.
dfuchs
parents:
1156
diff
changeset
|
564 |
public RoutingServerProxy newInstance(MBeanServer source, |
1570
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1222
diff
changeset
|
565 |
String sourcePath, String targetPath, boolean probe) { |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1222
diff
changeset
|
566 |
return new RoutingServerProxy( |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1222
diff
changeset
|
567 |
source, sourcePath, targetPath, probe); |
1222
78e3d021d528
6745832: jmx namespaces: Some refactoring/commenting would improve code readability.
dfuchs
parents:
1156
diff
changeset
|
568 |
} |
78e3d021d528
6745832: jmx namespaces: Some refactoring/commenting would improve code readability.
dfuchs
parents:
1156
diff
changeset
|
569 |
}; |
1156
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
570 |
|
1570
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1222
diff
changeset
|
571 |
public static MBeanServer cd( |
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1222
diff
changeset
|
572 |
MBeanServer source, String sourcePath, boolean probe) { |
1222
78e3d021d528
6745832: jmx namespaces: Some refactoring/commenting would improve code readability.
dfuchs
parents:
1156
diff
changeset
|
573 |
return RoutingProxy.cd(RoutingServerProxy.class, FACTORY, |
1570
4165709c91e3
5072267: A way to communicate client context such as locale to the JMX server
emcmanus
parents:
1222
diff
changeset
|
574 |
source, sourcePath, probe); |
1156
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
575 |
} |
bbc2d15aaf7a
5072476: RFE: support cascaded (federated) MBean Servers
dfuchs
parents:
diff
changeset
|
576 |
} |