KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > net > jmx > adaptor > server > Adaptor


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7
8 package org.jboss.net.jmx.adaptor.server;
9
10 import org.jboss.system.ServiceMBeanSupport;
11
12 /**
13  * wrapper around the mbean server that may be exposed as a
14  * soap-enabled mbean to the outside world.
15  *
16  * @todo convert to MBeanServerConnection
17  * @author <a HREF="mailto:Christoph.Jung@infor.de">Christoph G. Jung</a>
18  * @author <a HREF="mailto:Adrian.Brock@HappeningTimes.com">Adrian Brock</a>
19  * @created October 1, 2001
20  * @version $Revision: 1.17 $
21  */

22
23 public class Adaptor extends ServiceMBeanSupport implements AdaptorMBean, Constants
24 {
25
26    public void startService() throws Exception JavaDoc
27    {
28    }
29
30    public void stopService()
31    {
32    }
33
34    public java.lang.Object JavaDoc instantiate(java.lang.String JavaDoc str, javax.management.ObjectName JavaDoc objectName) throws javax.management.ReflectionException JavaDoc, javax.management.MBeanException JavaDoc, javax.management.InstanceNotFoundException JavaDoc
35    {
36       return getServer().instantiate(str, objectName);
37    }
38
39    public boolean isInstanceOf(javax.management.ObjectName JavaDoc objectName, java.lang.String JavaDoc str) throws javax.management.InstanceNotFoundException JavaDoc
40    {
41       return getServer().isInstanceOf(objectName, str);
42    }
43
44    public javax.management.ObjectInstance JavaDoc registerMBean(java.lang.Object JavaDoc obj, javax.management.ObjectName JavaDoc objectName) throws javax.management.InstanceAlreadyExistsException JavaDoc, javax.management.MBeanRegistrationException JavaDoc, javax.management.NotCompliantMBeanException JavaDoc
45    {
46       return getServer().registerMBean(obj, objectName);
47    }
48
49    public java.lang.String JavaDoc getDefaultDomain()
50    {
51       return getServer().getDefaultDomain();
52    }
53
54    public javax.management.MBeanInfo JavaDoc getMBeanInfo(javax.management.ObjectName JavaDoc objectName) throws javax.management.InstanceNotFoundException JavaDoc, javax.management.IntrospectionException JavaDoc, javax.management.ReflectionException JavaDoc
55    {
56       return getServer().getMBeanInfo(objectName);
57    }
58
59    public javax.management.ObjectInstance JavaDoc getObjectInstance(javax.management.ObjectName JavaDoc objectName) throws javax.management.InstanceNotFoundException JavaDoc
60    {
61       return getServer().getObjectInstance(objectName);
62    }
63
64    public java.lang.Object JavaDoc instantiate(java.lang.String JavaDoc str) throws javax.management.ReflectionException JavaDoc, javax.management.MBeanException JavaDoc
65    {
66       return getServer().instantiate(str);
67    }
68
69    public boolean isRegistered(javax.management.ObjectName JavaDoc objectName)
70    {
71       return getServer().isRegistered(objectName);
72    }
73
74    public void addNotificationListener(javax.management.ObjectName JavaDoc objectName, javax.management.NotificationListener JavaDoc notificationListener, javax.management.NotificationFilter JavaDoc notificationFilter, java.lang.Object JavaDoc obj) throws javax.management.InstanceNotFoundException JavaDoc
75    {
76       getServer().addNotificationListener(objectName, notificationListener, notificationFilter, obj);
77    }
78
79    public void addNotificationListener(javax.management.ObjectName JavaDoc objectName, javax.management.ObjectName JavaDoc objectName1, javax.management.NotificationFilter JavaDoc notificationFilter, java.lang.Object JavaDoc obj) throws javax.management.InstanceNotFoundException JavaDoc
80    {
81       getServer().addNotificationListener(objectName, objectName1, notificationFilter, obj);
82    }
83
84    public javax.management.ObjectInstance JavaDoc createMBean(java.lang.String JavaDoc str, javax.management.ObjectName JavaDoc objectName) throws javax.management.ReflectionException JavaDoc, javax.management.InstanceAlreadyExistsException JavaDoc, javax.management.MBeanRegistrationException JavaDoc, javax.management.MBeanException JavaDoc, javax.management.NotCompliantMBeanException JavaDoc
85    {
86       return getServer().createMBean(str, objectName);
87    }
88
89    public javax.management.ObjectInstance JavaDoc createMBean(java.lang.String JavaDoc str, javax.management.ObjectName JavaDoc objectName, javax.management.ObjectName JavaDoc objectName2) throws javax.management.ReflectionException JavaDoc, javax.management.InstanceAlreadyExistsException JavaDoc, javax.management.MBeanRegistrationException JavaDoc, javax.management.MBeanException JavaDoc, javax.management.NotCompliantMBeanException JavaDoc, javax.management.InstanceNotFoundException JavaDoc
90    {
91       return getServer().createMBean(str, objectName, objectName2);
92    }
93
94    public java.lang.Object JavaDoc getAttribute(javax.management.ObjectName JavaDoc objectName, java.lang.String JavaDoc str) throws javax.management.MBeanException JavaDoc, javax.management.AttributeNotFoundException JavaDoc, javax.management.InstanceNotFoundException JavaDoc, javax.management.ReflectionException JavaDoc
95    {
96       return getServer().getAttribute(objectName, str);
97    }
98
99    public javax.management.ObjectInstance JavaDoc createMBean(java.lang.String JavaDoc str, javax.management.ObjectName JavaDoc objectName, javax.management.ObjectName JavaDoc objectName2, java.lang.Object JavaDoc[] obj, java.lang.String JavaDoc[] str4) throws javax.management.ReflectionException JavaDoc, javax.management.InstanceAlreadyExistsException JavaDoc, javax.management.MBeanRegistrationException JavaDoc, javax.management.MBeanException JavaDoc, javax.management.NotCompliantMBeanException JavaDoc, javax.management.InstanceNotFoundException JavaDoc
100    {
101       return getServer().createMBean(str, objectName, objectName2, obj, str4);
102    }
103
104    public javax.management.ObjectInstance JavaDoc createMBean(java.lang.String JavaDoc str, javax.management.ObjectName JavaDoc objectName, java.lang.Object JavaDoc[] obj, java.lang.String JavaDoc[] str3) throws javax.management.ReflectionException JavaDoc, javax.management.InstanceAlreadyExistsException JavaDoc, javax.management.MBeanRegistrationException JavaDoc, javax.management.MBeanException JavaDoc, javax.management.NotCompliantMBeanException JavaDoc
105    {
106       return getServer().createMBean(str, objectName, obj, str3);
107    }
108
109    public void setAttribute(javax.management.ObjectName JavaDoc objectName, javax.management.Attribute JavaDoc attribute) throws javax.management.InstanceNotFoundException JavaDoc, javax.management.AttributeNotFoundException JavaDoc, javax.management.InvalidAttributeValueException JavaDoc, javax.management.MBeanException JavaDoc, javax.management.ReflectionException JavaDoc
110    {
111       getServer().setAttribute(objectName, attribute);
112    }
113
114    public java.lang.Object JavaDoc instantiate(java.lang.String JavaDoc str, java.lang.Object JavaDoc[] obj, java.lang.String JavaDoc[] str2) throws javax.management.ReflectionException JavaDoc, javax.management.MBeanException JavaDoc
115    {
116       return getServer().instantiate(str, obj, str2);
117    }
118
119    public java.lang.Object JavaDoc instantiate(java.lang.String JavaDoc str, javax.management.ObjectName JavaDoc objectName, java.lang.Object JavaDoc[] obj, java.lang.String JavaDoc[] str3) throws javax.management.ReflectionException JavaDoc, javax.management.MBeanException JavaDoc, javax.management.InstanceNotFoundException JavaDoc
120    {
121       return getServer().instantiate(str, objectName, obj, str3);
122    }
123
124    public java.io.ObjectInputStream JavaDoc deserialize(java.lang.String JavaDoc str, javax.management.ObjectName JavaDoc objectName, byte[] values) throws javax.management.InstanceNotFoundException JavaDoc, javax.management.OperationsException JavaDoc, javax.management.ReflectionException JavaDoc
125    {
126       return getServer().deserialize(str, objectName, values);
127    }
128
129    public java.io.ObjectInputStream JavaDoc deserialize(java.lang.String JavaDoc str, byte[] values) throws javax.management.OperationsException JavaDoc, javax.management.ReflectionException JavaDoc
130    {
131       return getServer().deserialize(str, values);
132    }
133
134    public java.util.Set JavaDoc queryMBeans(javax.management.ObjectName JavaDoc objectName, javax.management.QueryExp JavaDoc queryExp)
135    {
136       return getServer().queryMBeans(objectName, queryExp);
137    }
138
139    public javax.management.AttributeList JavaDoc setAttributes(javax.management.ObjectName JavaDoc objectName, javax.management.AttributeList JavaDoc attributeList) throws javax.management.InstanceNotFoundException JavaDoc, javax.management.ReflectionException JavaDoc
140    {
141       return getServer().setAttributes(objectName, attributeList);
142    }
143
144    public java.lang.Integer JavaDoc getMBeanCount()
145    {
146       return getServer().getMBeanCount();
147    }
148
149    public java.lang.Object JavaDoc invoke(javax.management.ObjectName JavaDoc objectName, java.lang.String JavaDoc str, java.lang.Object JavaDoc[] obj, java.lang.String JavaDoc[] str3) throws javax.management.InstanceNotFoundException JavaDoc, javax.management.MBeanException JavaDoc, javax.management.ReflectionException JavaDoc
150    {
151       return getServer().invoke(objectName, str, obj, str3);
152    }
153
154    public java.io.ObjectInputStream JavaDoc deserialize(javax.management.ObjectName JavaDoc objectName, byte[] values) throws javax.management.InstanceNotFoundException JavaDoc, javax.management.OperationsException JavaDoc
155    {
156       return getServer().deserialize(objectName, values);
157    }
158
159    public javax.management.AttributeList JavaDoc getAttributes(javax.management.ObjectName JavaDoc objectName, java.lang.String JavaDoc[] str) throws javax.management.InstanceNotFoundException JavaDoc, javax.management.ReflectionException JavaDoc
160    {
161       return getServer().getAttributes(objectName, str);
162    }
163
164    public java.util.Set JavaDoc queryNames(javax.management.ObjectName JavaDoc objectName, javax.management.QueryExp JavaDoc queryExp)
165    {
166       return getServer().queryNames(objectName, queryExp);
167    }
168
169    public void unregisterMBean(javax.management.ObjectName JavaDoc objectName) throws javax.management.InstanceNotFoundException JavaDoc, javax.management.MBeanRegistrationException JavaDoc
170    {
171       getServer().unregisterMBean(objectName);
172    }
173
174    public void removeNotificationListener(javax.management.ObjectName JavaDoc objectName, javax.management.ObjectName JavaDoc objectName1) throws javax.management.InstanceNotFoundException JavaDoc, javax.management.ListenerNotFoundException JavaDoc
175    {
176       getServer().removeNotificationListener(objectName, objectName1);
177    }
178
179    public void removeNotificationListener(javax.management.ObjectName JavaDoc objectName, javax.management.NotificationListener JavaDoc notificationListener) throws javax.management.InstanceNotFoundException JavaDoc, javax.management.ListenerNotFoundException JavaDoc
180    {
181       getServer().removeNotificationListener(objectName, notificationListener);
182    }
183
184    public javax.management.loading.ClassLoaderRepository JavaDoc getClassLoaderRepository()
185    {
186       return getServer().getClassLoaderRepository();
187    }
188
189    public java.lang.ClassLoader JavaDoc getClassLoader(javax.management.ObjectName JavaDoc objectName)
190       throws javax.management.InstanceNotFoundException JavaDoc
191    {
192       return getServer().getClassLoader(objectName);
193    }
194
195    public java.lang.ClassLoader JavaDoc getClassLoaderFor(javax.management.ObjectName JavaDoc objectName)
196       throws javax.management.InstanceNotFoundException JavaDoc
197    {
198       return getServer().getClassLoaderFor(objectName);
199    }
200
201    public void removeNotificationListener(javax.management.ObjectName JavaDoc objectName,
202       javax.management.ObjectName JavaDoc notificationListener,
203       javax.management.NotificationFilter JavaDoc filter,
204       java.lang.Object JavaDoc handback)
205       throws javax.management.InstanceNotFoundException JavaDoc, javax.management.ListenerNotFoundException JavaDoc
206    {
207       getServer().removeNotificationListener(objectName, notificationListener, filter, handback);
208    }
209
210    public void removeNotificationListener(javax.management.ObjectName JavaDoc objectName,
211       javax.management.NotificationListener JavaDoc notificationListener,
212       javax.management.NotificationFilter JavaDoc filter,
213       java.lang.Object JavaDoc handback)
214       throws javax.management.InstanceNotFoundException JavaDoc, javax.management.ListenerNotFoundException JavaDoc
215    {
216       getServer().removeNotificationListener(objectName, notificationListener, filter, handback);
217    }
218
219    public java.lang.String JavaDoc[] getDomains()
220    {
221       return getServer().getDomains();
222    }
223
224 }
225
Popular Tags