Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.module.management.agent
Class ClassloaderSwitchingMBeanWrapper

    java.lang.Object
      javax.management.StandardMBean
          org.mule.module.management.agent.ClassloaderSwitchingMBeanWrapper

All Implemented Interfaces:
  DynamicMBean, MBeanRegistration

    public class ClassloaderSwitchingMBeanWrapper

extends StandardMBean
implements MBeanRegistration

Ensures any external jmx invocation (like e.g. remote) is executed with a correct application classloader (otherwise a bootstrap classloader is used by default for platform mbean server). Note the irony - extends StandardMBean, but StandardMBean is not your 'standard mbean', but rather a special kind of the DynamicMBean which generates attributes/operations based on the passed in interface (via reflection).

Field Summary
`protected Log` | `logger`

Constructor Summary
`ClassloaderSwitchingMBeanWrapper(T implementation, Class<T> mbeanInterface, ClassLoader executionClassLoader)`

Method Summary
`ClassLoader` | `getExecutionClassLoader()`
`Object` | `invoke(String actionName, Object[] params, String[] signature)`
`void` | `postDeregister()`
`void` | `postRegister(Boolean registrationDone)`
`void` | `preDeregister()`
`ObjectName` | `preRegister(MBeanServer server, ObjectName name)`
`void` | `setExecutionClassLoader(ClassLoader executionClassLoader)`

Methods inherited from class javax.management.StandardMBean
`cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, getParameterName, setAttribute, setAttributes, setImplementation`

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

Field Detail

### logger

    protected Log logger

Constructor Detail

### ClassloaderSwitchingMBeanWrapper

    public ClassloaderSwitchingMBeanWrapper(T implementation,
                                            Class<T> mbeanInterface,
                                            ClassLoader executionClassLoader)
                                     throws NotCompliantMBeanException

Throws:
  `NotCompliantMBeanException`

Method Detail

### invoke

    public Object invoke(String actionName,
                         Object[] params,
                         String[] signature)
                  throws MBeanException,
                         ReflectionException

  Specified by:
    `invoke` in interface `DynamicMBean`
  Overrides:
    `invoke` in class `StandardMBean`
  Throws:
    `MBeanException`
    `ReflectionException`

### getExecutionClassLoader

    public ClassLoader getExecutionClassLoader()

### setExecutionClassLoader

    public void setExecutionClassLoader(ClassLoader executionClassLoader)

### preRegister

    public ObjectName preRegister(MBeanServer server,
                                  ObjectName name)
                           throws Exception

  Specified by:
    `preRegister` in interface `MBeanRegistration`
  Overrides:
    `preRegister` in class `StandardMBean`
  Throws:
    `Exception`

### postRegister

    public void postRegister(Boolean registrationDone)

  Specified by:
    `postRegister` in interface `MBeanRegistration`
  Overrides:
    `postRegister` in class `StandardMBean`

### preDeregister

    public void preDeregister()
                       throws Exception

  Specified by:
    `preDeregister` in interface `MBeanRegistration`
  Overrides:
    `preDeregister` in class `StandardMBean`
  Throws:
    `Exception`

### postDeregister

    public void postDeregister()

  Specified by:
    `postDeregister` in interface `MBeanRegistration`
  Overrides:
    `postDeregister` in class `StandardMBean`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2010 MuleSoft, Inc.. All Rights Reserved.