org.picocontainer.gems.jmx
Class ComponentTypeConventionMBeanInfoProvider

java.lang.Object
  extended by org.picocontainer.gems.jmx.AbstractNamingConventionMBeanInfoProvider
      extended by org.picocontainer.gems.jmx.ComponentTypeConventionMBeanInfoProvider
All Implemented Interfaces:
MBeanInfoProvider

public class ComponentTypeConventionMBeanInfoProvider
extends AbstractNamingConventionMBeanInfoProvider

A MBeanInfoProvider that searches for a MBeanInfo instance in the PicoContainer. The key of the MBeanInfo is calculated from the component type following naming conventions.

Author:
Jörg Schaible

Constructor Summary
ComponentTypeConventionMBeanInfoProvider()
           
 
Method Summary
 MBeanInfo provide(PicoContainer picoContainer, ComponentAdapter componentAdapter)
          Use the key of the component to search for a MBeanInfo in the PicoContainer.
 
Methods inherited from class org.picocontainer.gems.jmx.AbstractNamingConventionMBeanInfoProvider
instantiateMBeanInfo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentTypeConventionMBeanInfoProvider

public ComponentTypeConventionMBeanInfoProvider()
Method Detail

provide

public MBeanInfo provide(PicoContainer picoContainer,
                         ComponentAdapter componentAdapter)
Use the key of the component to search for a MBeanInfo in the PicoContainer. The matching MBeanInfo must be stored in the PicoContainer. The key of the MBeanInfo follows the naming scheme "<ComponentKey>MBeanInfo". The the component's key is a type, the class name is used as prefix otherwise the string representation of the key. The key part may already end with "MBean" as it would for components registered with the management interface as key, that follow the JMX naming conventions. As last resort the calculated key of the MBeanInfo is turned into a type that is used again as lookup key.

Parameters:
picoContainer - The picoContainer to resolve dependencies or other services necessary to get the MBeanInfo.
componentAdapter - The ComponentAdapter of the component.
Returns:
Returns the MBeanInfo for the compoennt or null if none could be found or created.
See Also:
MBeanInfoProvider.provide(org.picocontainer.PicoContainer, org.picocontainer.ComponentAdapter)


Copyright © 2003-2010 Codehaus. All Rights Reserved.