org.picocontainer.gems.jmx
Class RegisteredMBeanConstructingProvider

java.lang.Object
  extended by org.picocontainer.gems.jmx.RegisteredMBeanConstructingProvider
All Implemented Interfaces:
DynamicMBeanProvider

public class RegisteredMBeanConstructingProvider
extends Object
implements DynamicMBeanProvider

A DynamicMBeanProvider, that creates DynamicMBeans for registered Pico components on the fly.

Author:
Michael Ward, Jörg Schaible

Constructor Summary
RegisteredMBeanConstructingProvider()
          Construct a RegisteredMBeanConstructingProvider with a StandardMBeanFactory as default.
RegisteredMBeanConstructingProvider(DynamicMBeanFactory factory)
          Construct a RegisteredMBeanConstructingProvider, that uses a specific DynamicMBeanFactory.
 
Method Summary
 JMXRegistrationInfo provide(PicoContainer picoContainer, ComponentAdapter componentAdapter)
          Provide a DynamicMBean for the given Pico component.
 void register(ObjectName objectName, MBeanInfo mBeanInfo)
          Register a specific Pico component with an MBeanInfo and an ObjectName.
 void register(Object componentKey, ObjectName objectName)
          Register a specific Pico component by key with an ObjectName.
 void register(Object componentKey, ObjectName objectName, Class management, MBeanInfo mBeanInfo)
          Register a specific Pico component by key with an MBeanInfo and an ObjectName.
 void register(Object componentKey, ObjectName objectName, MBeanInfo mBeanInfo)
          Register a specific Pico component by key with an MBeanInfo and an ObjectName.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegisteredMBeanConstructingProvider

public RegisteredMBeanConstructingProvider()
Construct a RegisteredMBeanConstructingProvider with a StandardMBeanFactory as default.


RegisteredMBeanConstructingProvider

public RegisteredMBeanConstructingProvider(DynamicMBeanFactory factory)
Construct a RegisteredMBeanConstructingProvider, that uses a specific DynamicMBeanFactory.

Parameters:
factory -
Method Detail

provide

public JMXRegistrationInfo provide(PicoContainer picoContainer,
                                   ComponentAdapter componentAdapter)
Provide a DynamicMBean for the given Pico component. The implementation will lookup the component's key in the internal registry. Only components that were registered with additional information will be considered and a DynamicMBean will be created for them using the DynamicMBeanFactory. If the component key is of type class, it is used as management interface.

Specified by:
provide in interface DynamicMBeanProvider
Parameters:
picoContainer - The PicoContainer to resolve dependencies.
componentAdapter - The ComponentAdapter referring the component.
Returns:
Returns the registration information.
See Also:
DynamicMBeanProvider.provide(PicoContainer, ComponentAdapter)

register

public void register(Object componentKey,
                     ObjectName objectName,
                     Class management,
                     MBeanInfo mBeanInfo)
Register a specific Pico component by key with an MBeanInfo and an ObjectName.

Parameters:
componentKey - The key of the Pico component.
objectName - The ObjectName of the MBean.
management - The management interface.
mBeanInfo - The MBeanInfo of the MBean.

register

public void register(Object componentKey,
                     ObjectName objectName,
                     MBeanInfo mBeanInfo)
Register a specific Pico component by key with an MBeanInfo and an ObjectName.

Parameters:
componentKey - The key of the Pico component.
objectName - The ObjectName of the MBean.
mBeanInfo - The MBeanInfo of the MBean.

register

public void register(ObjectName objectName,
                     MBeanInfo mBeanInfo)
Register a specific Pico component with an MBeanInfo and an ObjectName. The implementation class of the DynamicMBean must be the key of the Pico component.

Parameters:
objectName - The ObjectName of the MBean.
mBeanInfo - The MBeanInfo of the MBean.

register

public void register(Object componentKey,
                     ObjectName objectName)
Register a specific Pico component by key with an ObjectName.

Parameters:
componentKey - The key of the Pico component.
objectName - The ObjectName of the MBean.


Copyright © 2003-2010 Codehaus. All Rights Reserved.