## mx4j.server
Class ChainedMBeanServer

    java.lang.Object
      mx4j.server.ChainedMBeanServer

All Implemented Interfaces:
  javax.management.MBeanServer, javax.management.MBeanServerConnection

Direct Known Subclasses:
  UnmarshallingMBeanServer

public class ChainedMBeanServer
extends java.lang.Object
implements javax.management.MBeanServer

Base class for chained MBeanServers. By default this class delegates all method calls to the nested MBeanServer. Subclass it to add behavior to one or more (or all) methods.

Version:
  $Revision: 1.6 $

Constructor Summary
`ChainedMBeanServer()` Creates a new ChainedMBeanServer that will delegate to an MBeanServer specified using `setMBeanServer(javax.management.MBeanServer)`
`ChainedMBeanServer(javax.management.MBeanServer server)` Creates a new ChainedMBeanServer that delegates to the specified `MBeanServer`.

Method Summary
`void` `addNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)`
`void` `addNotificationListener(javax.management.ObjectName observed, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback)`
`javax.management.ObjectInstance` `createMBean(java.lang.String className, javax.management.ObjectName objectName)`
`javax.management.ObjectInstance` `createMBean(java.lang.String className, javax.management.ObjectName objectName, java.lang.Object[] args, java.lang.String[] parameters)`
`javax.management.ObjectInstance` `createMBean(java.lang.String className, javax.management.ObjectName objectName, javax.management.ObjectName loaderName)`
`javax.management.ObjectInstance` `createMBean(java.lang.String className, javax.management.ObjectName objectName, javax.management.ObjectName loaderName, java.lang.Object[] args, java.lang.String[] parameters)`
`java.io.ObjectInputStream` `deserialize(javax.management.ObjectName objectName, byte[] bytes)`
`java.io.ObjectInputStream` `deserialize(java.lang.String className, byte[] bytes)`
`java.io.ObjectInputStream` `deserialize(java.lang.String className, javax.management.ObjectName loaderName, byte[] bytes)`
`java.lang.Object` `getAttribute(javax.management.ObjectName objectName, java.lang.String attribute)`
`javax.management.AttributeList` `getAttributes(javax.management.ObjectName objectName, java.lang.String[] attributes)`
`java.lang.ClassLoader` `getClassLoader(javax.management.ObjectName loaderName)`
`java.lang.ClassLoader` `getClassLoaderFor(javax.management.ObjectName mbeanName)`
`javax.management.loading.ClassLoaderRepository` `getClassLoaderRepository()`
`java.lang.String` `getDefaultDomain()`
`java.lang.String[]` `getDomains()`
`java.lang.Integer` `getMBeanCount()`
`javax.management.MBeanInfo` `getMBeanInfo(javax.management.ObjectName objectName)`
`protected javax.management.MBeanServer` `getMBeanServer()` Returns the nested MBeanServer
`javax.management.ObjectInstance` `getObjectInstance(javax.management.ObjectName objectName)`
`java.lang.Object` `instantiate(java.lang.String className)`
`java.lang.Object` `instantiate(java.lang.String className, java.lang.Object[] args, java.lang.String[] parameters)`
`java.lang.Object` `instantiate(java.lang.String className, javax.management.ObjectName loaderName)`
`java.lang.Object` `instantiate(java.lang.String className, javax.management.ObjectName loaderName, java.lang.Object[] args, java.lang.String[] parameters)`
`java.lang.Object` `invoke(javax.management.ObjectName objectName, java.lang.String methodName, java.lang.Object[] args, java.lang.String[] parameters)`
`boolean` `isInstanceOf(javax.management.ObjectName objectName, java.lang.String className)`
`boolean` `isRegistered(javax.management.ObjectName objectname)`
`java.util.Set` `queryMBeans(javax.management.ObjectName patternName, javax.management.QueryExp filter)`
`java.util.Set` `queryNames(javax.management.ObjectName patternName, javax.management.QueryExp filter)`
`javax.management.ObjectInstance` `registerMBean(java.lang.Object mbean, javax.management.ObjectName objectName)`
`void` `removeNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener)`
`void` `removeNotificationListener(javax.management.ObjectName observed, javax.management.NotificationListener listener, javax.management.NotificationFilter filter, java.lang.Object handback)`
`void` `removeNotificationListener(javax.management.ObjectName observed, javax.management.ObjectName listener)`
`void` `removeNotificationListener(javax.management.ObjectName observed, javax.management.ObjectName listener, javax.management.NotificationFilter filter, java.lang.Object handback)`
`void` `setAttribute(javax.management.ObjectName objectName, javax.management.Attribute attribute)`
`javax.management.AttributeList` `setAttributes(javax.management.ObjectName objectName, javax.management.AttributeList attributes)`
`protected void` `setMBeanServer(javax.management.MBeanServer server)`
`void` `unregisterMBean(javax.management.ObjectName objectName)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ChainedMBeanServer

    public ChainedMBeanServer()

  Creates a new ChainedMBeanServer that will delegate to an MBeanServer specified using `setMBeanServer(javax.management.MBeanServer)`

### ChainedMBeanServer

    public ChainedMBeanServer(javax.management.MBeanServer server)

  Creates a new ChainedMBeanServer that delegates to the specified `MBeanServer`.

Method Detail

### getMBeanServer

    protected javax.management.MBeanServer getMBeanServer()

  Returns the nested MBeanServer

### setMBeanServer

    protected void setMBeanServer(javax.management.MBeanServer server)

### addNotificationListener

    public void addNotificationListener(javax.management.ObjectName observed,
                                        javax.management.NotificationListener listener,
                                        javax.management.NotificationFilter filter,
                                        java.lang.Object handback)
                                 throws javax.management.InstanceNotFoundException

  Specified by:
    `addNotificationListener` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`

### addNotificationListener

    public void addNotificationListener(javax.management.ObjectName observed,
                                        javax.management.ObjectName listener,
                                        javax.management.NotificationFilter filter,
                                        java.lang.Object handback)
                                 throws javax.management.InstanceNotFoundException

  Specified by:
    `addNotificationListener` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`

### createMBean

    public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                       javax.management.ObjectName objectName)
                                                throws javax.management.ReflectionException,
                                                       javax.management.InstanceAlreadyExistsException,
                                                       javax.management.MBeanRegistrationException,
                                                       javax.management.MBeanException,
                                                       javax.management.NotCompliantMBeanException

  Specified by:
    `createMBean` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.ReflectionException`
    `javax.management.InstanceAlreadyExistsException`
    `javax.management.MBeanRegistrationException`
    `javax.management.MBeanException`
    `javax.management.NotCompliantMBeanException`

### createMBean

    public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                       javax.management.ObjectName objectName,
                                                       java.lang.Object[] args,
                                                       java.lang.String[] parameters)
                                                throws javax.management.ReflectionException,
                                                       javax.management.InstanceAlreadyExistsException,
                                                       javax.management.MBeanRegistrationException,
                                                       javax.management.MBeanException,
                                                       javax.management.NotCompliantMBeanException

  Specified by:
    `createMBean` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.ReflectionException`
    `javax.management.InstanceAlreadyExistsException`
    `javax.management.MBeanRegistrationException`
    `javax.management.MBeanException`
    `javax.management.NotCompliantMBeanException`

### createMBean

    public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                       javax.management.ObjectName objectName,
                                                       javax.management.ObjectName loaderName)
                                                throws javax.management.ReflectionException,
                                                       javax.management.InstanceAlreadyExistsException,
                                                       javax.management.MBeanRegistrationException,
                                                       javax.management.MBeanException,
                                                       javax.management.NotCompliantMBeanException,
                                                       javax.management.InstanceNotFoundException

  Specified by:
    `createMBean` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.ReflectionException`
    `javax.management.InstanceAlreadyExistsException`
    `javax.management.MBeanRegistrationException`
    `javax.management.MBeanException`
    `javax.management.NotCompliantMBeanException`
    `javax.management.InstanceNotFoundException`

### createMBean

    public javax.management.ObjectInstance createMBean(java.lang.String className,
                                                       javax.management.ObjectName objectName,
                                                       javax.management.ObjectName loaderName,
                                                       java.lang.Object[] args,
                                                       java.lang.String[] parameters)
                                                throws javax.management.ReflectionException,
                                                       javax.management.InstanceAlreadyExistsException,
                                                       javax.management.MBeanRegistrationException,
                                                       javax.management.MBeanException,
                                                       javax.management.NotCompliantMBeanException,
                                                       javax.management.InstanceNotFoundException

  Specified by:
    `createMBean` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.ReflectionException`
    `javax.management.InstanceAlreadyExistsException`
    `javax.management.MBeanRegistrationException`
    `javax.management.MBeanException`
    `javax.management.NotCompliantMBeanException`
    `javax.management.InstanceNotFoundException`

### deserialize

    public java.io.ObjectInputStream deserialize(java.lang.String className,
                                                 byte[] bytes)
                                          throws javax.management.OperationsException,
                                                 javax.management.ReflectionException

  Specified by:
    `deserialize` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.OperationsException`
    `javax.management.ReflectionException`

### deserialize

    public java.io.ObjectInputStream deserialize(java.lang.String className,
                                                 javax.management.ObjectName loaderName,
                                                 byte[] bytes)
                                          throws javax.management.InstanceNotFoundException,
                                                 javax.management.OperationsException,
                                                 javax.management.ReflectionException

  Specified by:
    `deserialize` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.OperationsException`
    `javax.management.ReflectionException`

### deserialize

    public java.io.ObjectInputStream deserialize(javax.management.ObjectName objectName,
                                                 byte[] bytes)
                                          throws javax.management.InstanceNotFoundException,
                                                 javax.management.OperationsException

  Specified by:
    `deserialize` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.OperationsException`

### getAttribute

    public java.lang.Object getAttribute(javax.management.ObjectName objectName,
                                         java.lang.String attribute)
                                  throws javax.management.MBeanException,
                                         javax.management.AttributeNotFoundException,
                                         javax.management.InstanceNotFoundException,
                                         javax.management.ReflectionException

  Specified by:
    `getAttribute` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.MBeanException`
    `javax.management.AttributeNotFoundException`
    `javax.management.InstanceNotFoundException`
    `javax.management.ReflectionException`

### getAttributes

    public javax.management.AttributeList getAttributes(javax.management.ObjectName objectName,
                                                        java.lang.String[] attributes)
                                                 throws javax.management.InstanceNotFoundException,
                                                        javax.management.ReflectionException

  Specified by:
    `getAttributes` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.ReflectionException`

### getDefaultDomain

    public java.lang.String getDefaultDomain()

  Specified by:
    `getDefaultDomain` in interface `javax.management.MBeanServer`

### getDomains

    public java.lang.String[] getDomains()

  Specified by:
    `getDomains` in interface `javax.management.MBeanServer`

### getMBeanCount

    public java.lang.Integer getMBeanCount()

  Specified by:
    `getMBeanCount` in interface `javax.management.MBeanServer`

### getMBeanInfo

    public javax.management.MBeanInfo getMBeanInfo(javax.management.ObjectName objectName)
                                            throws javax.management.InstanceNotFoundException,
                                                   javax.management.IntrospectionException,
                                                   javax.management.ReflectionException

  Specified by:
    `getMBeanInfo` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.IntrospectionException`
    `javax.management.ReflectionException`

### getObjectInstance

    public javax.management.ObjectInstance getObjectInstance(javax.management.ObjectName objectName)
                                                      throws javax.management.InstanceNotFoundException

  Specified by:
    `getObjectInstance` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`

### instantiate

    public java.lang.Object instantiate(java.lang.String className)
                                 throws javax.management.ReflectionException,
                                        javax.management.MBeanException

  Specified by:
    `instantiate` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.ReflectionException`
    `javax.management.MBeanException`

### instantiate

    public java.lang.Object instantiate(java.lang.String className,
                                        java.lang.Object[] args,
                                        java.lang.String[] parameters)
                                 throws javax.management.ReflectionException,
                                        javax.management.MBeanException

  Specified by:
    `instantiate` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.ReflectionException`
    `javax.management.MBeanException`

### instantiate

    public java.lang.Object instantiate(java.lang.String className,
                                        javax.management.ObjectName loaderName)
                                 throws javax.management.ReflectionException,
                                        javax.management.MBeanException,
                                        javax.management.InstanceNotFoundException

  Specified by:
    `instantiate` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.ReflectionException`
    `javax.management.MBeanException`
    `javax.management.InstanceNotFoundException`

### instantiate

    public java.lang.Object instantiate(java.lang.String className,
                                        javax.management.ObjectName loaderName,
                                        java.lang.Object[] args,
                                        java.lang.String[] parameters)
                                 throws javax.management.ReflectionException,
                                        javax.management.MBeanException,
                                        javax.management.InstanceNotFoundException

  Specified by:
    `instantiate` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.ReflectionException`
    `javax.management.MBeanException`
    `javax.management.InstanceNotFoundException`

### invoke

    public java.lang.Object invoke(javax.management.ObjectName objectName,
                                   java.lang.String methodName,
                                   java.lang.Object[] args,
                                   java.lang.String[] parameters)
                            throws javax.management.InstanceNotFoundException,
                                   javax.management.MBeanException,
                                   javax.management.ReflectionException

  Specified by:
    `invoke` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.MBeanException`
    `javax.management.ReflectionException`

### isInstanceOf

    public boolean isInstanceOf(javax.management.ObjectName objectName,
                                java.lang.String className)
                         throws javax.management.InstanceNotFoundException

  Specified by:
    `isInstanceOf` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`

### isRegistered

    public boolean isRegistered(javax.management.ObjectName objectname)

  Specified by:
    `isRegistered` in interface `javax.management.MBeanServer`

### queryMBeans

    public java.util.Set queryMBeans(javax.management.ObjectName patternName,
                                     javax.management.QueryExp filter)

  Specified by:
    `queryMBeans` in interface `javax.management.MBeanServer`

### queryNames

    public java.util.Set queryNames(javax.management.ObjectName patternName,
                                    javax.management.QueryExp filter)

  Specified by:
    `queryNames` in interface `javax.management.MBeanServer`

### registerMBean

    public javax.management.ObjectInstance registerMBean(java.lang.Object mbean,
                                                         javax.management.ObjectName objectName)
                                                  throws javax.management.InstanceAlreadyExistsException,
                                                         javax.management.MBeanRegistrationException,
                                                         javax.management.NotCompliantMBeanException

  Specified by:
    `registerMBean` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceAlreadyExistsException`
    `javax.management.MBeanRegistrationException`
    `javax.management.NotCompliantMBeanException`

### removeNotificationListener

    public void removeNotificationListener(javax.management.ObjectName observed,
                                           javax.management.NotificationListener listener)
                                    throws javax.management.InstanceNotFoundException,
                                           javax.management.ListenerNotFoundException

  Specified by:
    `removeNotificationListener` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.ListenerNotFoundException`

### removeNotificationListener

    public void removeNotificationListener(javax.management.ObjectName observed,
                                           javax.management.ObjectName listener)
                                    throws javax.management.InstanceNotFoundException,
                                           javax.management.ListenerNotFoundException

  Specified by:
    `removeNotificationListener` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.ListenerNotFoundException`

### removeNotificationListener

    public void removeNotificationListener(javax.management.ObjectName observed,
                                           javax.management.ObjectName listener,
                                           javax.management.NotificationFilter filter,
                                           java.lang.Object handback)
                                    throws javax.management.InstanceNotFoundException,
                                           javax.management.ListenerNotFoundException

  Specified by:
    `removeNotificationListener` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.ListenerNotFoundException`

### removeNotificationListener

    public void removeNotificationListener(javax.management.ObjectName observed,
                                           javax.management.NotificationListener listener,
                                           javax.management.NotificationFilter filter,
                                           java.lang.Object handback)
                                    throws javax.management.InstanceNotFoundException,
                                           javax.management.ListenerNotFoundException

  Specified by:
    `removeNotificationListener` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.ListenerNotFoundException`

### setAttribute

    public void setAttribute(javax.management.ObjectName objectName,
                             javax.management.Attribute attribute)
                      throws javax.management.InstanceNotFoundException,
                             javax.management.AttributeNotFoundException,
                             javax.management.InvalidAttributeValueException,
                             javax.management.MBeanException,
                             javax.management.ReflectionException

  Specified by:
    `setAttribute` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.AttributeNotFoundException`
    `javax.management.InvalidAttributeValueException`
    `javax.management.MBeanException`
    `javax.management.ReflectionException`

### setAttributes

    public javax.management.AttributeList setAttributes(javax.management.ObjectName objectName,
                                                        javax.management.AttributeList attributes)
                                                 throws javax.management.InstanceNotFoundException,
                                                        javax.management.ReflectionException

  Specified by:
    `setAttributes` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.ReflectionException`

### unregisterMBean

    public void unregisterMBean(javax.management.ObjectName objectName)
                         throws javax.management.InstanceNotFoundException,
                                javax.management.MBeanRegistrationException

  Specified by:
    `unregisterMBean` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`
    `javax.management.MBeanRegistrationException`

### getClassLoaderFor

    public java.lang.ClassLoader getClassLoaderFor(javax.management.ObjectName mbeanName)
                                            throws javax.management.InstanceNotFoundException

  Specified by:
    `getClassLoaderFor` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`

### getClassLoader

    public java.lang.ClassLoader getClassLoader(javax.management.ObjectName loaderName)
                                         throws javax.management.InstanceNotFoundException

  Specified by:
    `getClassLoader` in interface `javax.management.MBeanServer`
  Throws:
    `javax.management.InstanceNotFoundException`

### getClassLoaderRepository

    public javax.management.loading.ClassLoaderRepository getClassLoaderRepository()

  Specified by:
    `getClassLoaderRepository` in interface `javax.management.MBeanServer`

Copyright © 2001-2003 MX4J Team. All Rights Reserved.