src/org/objectweb/cjdbc/controller/jmx/ChainedMBeanServer.java

説明を見る。
00001 00025 package org.objectweb.cjdbc.controller.jmx; 00026 00027 import java.io.ObjectInputStream; 00028 import java.util.Set; 00029 00030 import javax.management.Attribute; 00031 import javax.management.AttributeList; 00032 import javax.management.AttributeNotFoundException; 00033 import javax.management.InstanceAlreadyExistsException; 00034 import javax.management.InstanceNotFoundException; 00035 import javax.management.IntrospectionException; 00036 import javax.management.InvalidAttributeValueException; 00037 import javax.management.ListenerNotFoundException; 00038 import javax.management.MBeanException; 00039 import javax.management.MBeanInfo; 00040 import javax.management.MBeanRegistrationException; 00041 import javax.management.MBeanServer; 00042 import javax.management.NotCompliantMBeanException; 00043 import javax.management.NotificationFilter; 00044 import javax.management.NotificationListener; 00045 import javax.management.ObjectInstance; 00046 import javax.management.ObjectName; 00047 import javax.management.OperationsException; 00048 import javax.management.QueryExp; 00049 import javax.management.ReflectionException; 00050 import javax.management.loading.ClassLoaderRepository; 00051 00062 public class ChainedMBeanServer implements MBeanServer 00063 00064 { 00065 private MBeanServer mbServer; 00066 00071 public ChainedMBeanServer() 00072 { 00073 this(null); 00074 } 00075 00082 public ChainedMBeanServer(MBeanServer server) 00083 { 00084 setMBeanServer(server); 00085 } 00086 00090 protected synchronized MBeanServer getMBeanServer() 00091 { 00092 return mbServer; 00093 } 00094 00095 protected synchronized void setMBeanServer(MBeanServer server) 00096 { 00097 mbServer = server; 00098 } 00099 00105 public void addNotificationListener(ObjectName observed, 00106 NotificationListener listener, NotificationFilter filter, Object handback) 00107 throws InstanceNotFoundException 00108 { 00109 getMBeanServer().addNotificationListener(observed, listener, filter, 00110 handback); 00111 } 00112 00118 public void addNotificationListener(ObjectName observed, ObjectName listener, 00119 NotificationFilter filter, Object handback) 00120 throws InstanceNotFoundException 00121 { 00122 getMBeanServer().addNotificationListener(observed, listener, filter, 00123 handback); 00124 } 00125 00130 public ObjectInstance createMBean(String className, ObjectName objectName) 00131 throws ReflectionException, InstanceAlreadyExistsException, 00132 MBeanRegistrationException, MBeanException, NotCompliantMBeanException 00133 { 00134 return getMBeanServer().createMBean(className, objectName); 00135 } 00136 00141 public ObjectInstance createMBean(String className, ObjectName objectName, 00142 Object[] args, String[] parameters) throws ReflectionException, 00143 InstanceAlreadyExistsException, MBeanRegistrationException, 00144 MBeanException, NotCompliantMBeanException 00145 { 00146 return getMBeanServer() 00147 .createMBean(className, objectName, args, parameters); 00148 } 00149 00154 public ObjectInstance createMBean(String className, ObjectName objectName, 00155 ObjectName loaderName) throws ReflectionException, 00156 InstanceAlreadyExistsException, MBeanRegistrationException, 00157 MBeanException, NotCompliantMBeanException, InstanceNotFoundException 00158 { 00159 return getMBeanServer().createMBean(className, objectName, loaderName); 00160 } 00161 00167 public ObjectInstance createMBean(String className, ObjectName objectName, 00168 ObjectName loaderName, Object[] args, String[] parameters) 00169 throws ReflectionException, InstanceAlreadyExistsException, 00170 MBeanRegistrationException, MBeanException, NotCompliantMBeanException, 00171 InstanceNotFoundException 00172 { 00173 return getMBeanServer().createMBean(className, objectName, loaderName, 00174 args, parameters); 00175 } 00176 00180 public ObjectInputStream deserialize(String className, byte[] bytes) 00181 throws OperationsException, ReflectionException 00182 { 00183 return getMBeanServer().deserialize(className, bytes); 00184 } 00185 00190 public ObjectInputStream deserialize(String className, ObjectName loaderName, 00191 byte[] bytes) throws InstanceNotFoundException, OperationsException, 00192 ReflectionException 00193 { 00194 return getMBeanServer().deserialize(className, loaderName, bytes); 00195 } 00196 00201 public ObjectInputStream deserialize(ObjectName objectName, byte[] bytes) 00202 throws InstanceNotFoundException, OperationsException 00203 { 00204 return getMBeanServer().deserialize(objectName, bytes); 00205 } 00206 00211 public Object getAttribute(ObjectName objectName, String attribute) 00212 throws MBeanException, AttributeNotFoundException, 00213 InstanceNotFoundException, ReflectionException 00214 { 00215 return getMBeanServer().getAttribute(objectName, attribute); 00216 } 00217 00222 public AttributeList getAttributes(ObjectName objectName, String[] attributes) 00223 throws InstanceNotFoundException, ReflectionException 00224 { 00225 return getMBeanServer().getAttributes(objectName, attributes); 00226 } 00227 00231 public String getDefaultDomain() 00232 { 00233 return getMBeanServer().getDefaultDomain(); 00234 } 00235 00239 public String[] getDomains() 00240 { 00241 return getMBeanServer().getDomains(); 00242 } 00243 00247 public Integer getMBeanCount() 00248 { 00249 return getMBeanServer().getMBeanCount(); 00250 } 00251 00255 public MBeanInfo getMBeanInfo(ObjectName objectName) 00256 throws InstanceNotFoundException, IntrospectionException, 00257 ReflectionException 00258 { 00259 return getMBeanServer().getMBeanInfo(objectName); 00260 } 00261 00265 public ObjectInstance getObjectInstance(ObjectName objectName) 00266 throws InstanceNotFoundException 00267 { 00268 return getMBeanServer().getObjectInstance(objectName); 00269 } 00270 00274 public Object instantiate(String className) throws ReflectionException, 00275 MBeanException 00276 { 00277 return getMBeanServer().instantiate(className); 00278 } 00279 00284 public Object instantiate(String className, Object[] args, String[] parameters) 00285 throws ReflectionException, MBeanException 00286 { 00287 return getMBeanServer().instantiate(className, args, parameters); 00288 } 00289 00294 public Object instantiate(String className, ObjectName loaderName) 00295 throws ReflectionException, MBeanException, InstanceNotFoundException 00296 { 00297 return getMBeanServer().instantiate(className, loaderName); 00298 } 00299 00304 public Object instantiate(String className, ObjectName loaderName, 00305 Object[] args, String[] parameters) throws ReflectionException, 00306 MBeanException, InstanceNotFoundException 00307 { 00308 return getMBeanServer() 00309 .instantiate(className, loaderName, args, parameters); 00310 } 00311 00316 public Object invoke(ObjectName objectName, String methodName, Object[] args, 00317 String[] parameters) throws InstanceNotFoundException, MBeanException, 00318 ReflectionException 00319 { 00320 return getMBeanServer().invoke(objectName, methodName, args, parameters); 00321 } 00322 00327 public boolean isInstanceOf(ObjectName objectName, String className) 00328 throws InstanceNotFoundException 00329 { 00330 return getMBeanServer().isInstanceOf(objectName, className); 00331 } 00332 00336 public boolean isRegistered(ObjectName objectname) 00337 { 00338 return getMBeanServer().isRegistered(objectname); 00339 } 00340 00345 public Set queryMBeans(ObjectName patternName, QueryExp filter) 00346 { 00347 return getMBeanServer().queryMBeans(patternName, filter); 00348 } 00349 00354 public Set queryNames(ObjectName patternName, QueryExp filter) 00355 { 00356 return getMBeanServer().queryNames(patternName, filter); 00357 } 00358 00363 public ObjectInstance registerMBean(Object mbean, ObjectName objectName) 00364 throws InstanceAlreadyExistsException, MBeanRegistrationException, 00365 NotCompliantMBeanException 00366 { 00367 return getMBeanServer().registerMBean(mbean, objectName); 00368 } 00369 00374 public void removeNotificationListener(ObjectName observed, 00375 NotificationListener listener) throws InstanceNotFoundException, 00376 ListenerNotFoundException 00377 { 00378 getMBeanServer().removeNotificationListener(observed, listener); 00379 } 00380 00385 public void removeNotificationListener(ObjectName observed, 00386 ObjectName listener) throws InstanceNotFoundException, 00387 ListenerNotFoundException 00388 { 00389 getMBeanServer().removeNotificationListener(observed, listener); 00390 } 00391 00397 public void removeNotificationListener(ObjectName observed, 00398 ObjectName listener, NotificationFilter filter, Object handback) 00399 throws InstanceNotFoundException, ListenerNotFoundException 00400 { 00401 getMBeanServer().removeNotificationListener(observed, listener, filter, 00402 handback); 00403 } 00404 00410 public void removeNotificationListener(ObjectName observed, 00411 NotificationListener listener, NotificationFilter filter, Object handback) 00412 throws InstanceNotFoundException, ListenerNotFoundException 00413 { 00414 getMBeanServer().removeNotificationListener(observed, listener, filter, 00415 handback); 00416 } 00417 00422 public void setAttribute(ObjectName objectName, Attribute attribute) 00423 throws InstanceNotFoundException, AttributeNotFoundException, 00424 InvalidAttributeValueException, MBeanException, ReflectionException 00425 { 00426 getMBeanServer().setAttribute(objectName, attribute); 00427 } 00428 00433 public AttributeList setAttributes(ObjectName objectName, 00434 AttributeList attributes) throws InstanceNotFoundException, 00435 ReflectionException 00436 { 00437 return getMBeanServer().setAttributes(objectName, attributes); 00438 } 00439 00443 public void unregisterMBean(ObjectName objectName) 00444 throws InstanceNotFoundException, MBeanRegistrationException 00445 { 00446 getMBeanServer().unregisterMBean(objectName); 00447 } 00448 00452 public ClassLoader getClassLoaderFor(ObjectName mbeanName) 00453 throws InstanceNotFoundException 00454 { 00455 return getMBeanServer().getClassLoaderFor(mbeanName); 00456 } 00457 00461 public ClassLoader getClassLoader(ObjectName loaderName) 00462 throws InstanceNotFoundException 00463 { 00464 return getMBeanServer().getClassLoader(loaderName); 00465 } 00466 00470 public ClassLoaderRepository getClassLoaderRepository() 00471 { 00472 return getMBeanServer().getClassLoaderRepository(); 00473 } 00474 00475 }

CJDBCversion1.0.4に対してTue Oct 12 15:16:01 2004に生成されました。 doxygen 1.3.8