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.picocontainer.gems.jmx
Class AbstractConstructingProvider

    java.lang.Object
      org.picocontainer.gems.jmx.AbstractConstructingProvider

All Implemented Interfaces:
  DynamicMBeanProvider

Direct Known Subclasses:
  NamingConventionConstructingProvider

    public abstract class AbstractConstructingProvider

extends Object
implements DynamicMBeanProvider

A DynamicMBeanProvider that constructs StandardMBean instances that as long as an ObjectName and a MBeanInfo can be generated for the component.

Author:
  Jörg Schaible

Constructor Summary
`AbstractConstructingProvider()`

Method Summary
`protected abstract Class` | `getManagementInterface(Class implementation, MBeanInfo mBeanInfo)` Determin the management interface from the component implementation type and an optional MBeanInfo instance.
`protected abstract DynamicMBeanFactory` | `getMBeanFactory()`
`protected abstract MBeanInfoProvider[]` | `getMBeanInfoProviders()` Deliver the MBeanInfoProvider instances to use.
`protected abstract ObjectNameFactory` | `getObjectNameFactory()` Deliver the ObjectNameFactory used to provide the `ObjectName` instances registering the MBeans.
`JMXRegistrationInfo` | `provide(org.picocontainer.PicoContainer picoContainer, org.picocontainer.ComponentAdapter componentAdapter)` Create a StandardMBean from the component provided by the ComponentAdapter.

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

Constructor Detail

### AbstractConstructingProvider

    public AbstractConstructingProvider()

Method Detail

### provide

    public JMXRegistrationInfo provide(org.picocontainer.PicoContainer picoContainer,
                                       org.picocontainer.ComponentAdapter componentAdapter)

  Create a StandardMBean from the component provided by the ComponentAdapter. One of the registered `MBeanInfoProvider` instances must provide a `MBeanInfo` for the component and the registered `ObjectNameFactory` has to provide a proper `ObjectName`.

  Note: An instance of the component is only created, if a management interface is available.

  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(org.picocontainer.PicoContainer, org.picocontainer.ComponentAdapter)`

### getMBeanFactory

    protected abstract DynamicMBeanFactory getMBeanFactory()

  Returns:
    Returns the `DynamicMBeanFactory` to use.

### getObjectNameFactory

    protected abstract ObjectNameFactory getObjectNameFactory()

  Deliver the ObjectNameFactory used to provide the `ObjectName` instances registering the MBeans.

  Returns:
    Return the `ObjectNameFactory` instance.

### getMBeanInfoProviders

    protected abstract MBeanInfoProvider[] getMBeanInfoProviders()

  Deliver the MBeanInfoProvider instances to use. The instances are used in the delivered sequence to retrieve a `MBeanInfo` for a MBean to create. It is valid for an implementation to return an empty array.

  Returns:
    Return an array of `MBeanInfoProvider` instances.

### getManagementInterface

    protected abstract Class getManagementInterface(Class implementation,
                                                    MBeanInfo mBeanInfo)
                                             throws ClassNotFoundException

  Determin the management interface from the component implementation type and an optional MBeanInfo instance.

  Parameters:
    `implementation` - The type of the component's implementation.
    `mBeanInfo` - The `MBeanInfo` to expose the component. May be `null`.
  Returns:
    Returns the management interface.
  Throws:
    `ClassNotFoundException` - Thrown if no interface can be determined.

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-2009 Codehaus. All Rights Reserved.