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.osgi.service.blueprint.container
Interface BlueprintContainer

All Known Implementing Classes:
  SpringBlueprintContainer

    public interface BlueprintContainer

A Blueprint Container represents the managed state of a Blueprint bundle. A Blueprint Container provides access to all managed components. These are the beans, services, and service references. Only bundles in the `ACTIVE` state (and also the `STARTING` state for bundles awaiting lazy activation) can have an associated Blueprint Container. A given Bundle Context has at most one associated Blueprint Container. A Blueprint Container can be obtained by injecting the predefined "blueprintContainer" component id. The Blueprint Container is also registered as a service and its managed components can be queried.

Version:
  $Revision: 7556 $

Method Summary
`Set` | `getComponentIds()` Returns the set of component ids managed by this Blueprint Container.
`Object` | `getComponentInstance(String id)` Return the component instance for the specified component id.
`ComponentMetadata` | `getComponentMetadata(String id)` Return the Component Metadata object for the component with the specified component id.
`Collection` | `getMetadata(Class type)` Return all `ComponentMetadata` objects of the specified Component Metadata type.

Method Detail

### getComponentIds

    Set getComponentIds()

  Returns the set of component ids managed by this Blueprint Container.

  Returns:
    An immutable Set of Strings, containing the ids of all of the components managed within this Blueprint Container.

### getComponentInstance

    Object getComponentInstance(String id)

  Return the component instance for the specified component id. If the component's manager has not yet been activated, calling this operation will atomically activate it. If the component has singleton scope, the activation will cause the component instance to be created and initialized. If the component has prototype scope, then each call to this method will return a new component instance.

  Parameters:
    `id` - The component id for the requested component instance.
  Returns:
    A component instance for the component with the specified component id.
  Throws:
    `NoSuchComponentException` - If no component with the specified component id is managed by this Blueprint Container.

### getComponentMetadata

    ComponentMetadata getComponentMetadata(String id)

  Return the Component Metadata object for the component with the specified component id.

  Parameters:
    `id` - The component id for the requested Component Metadata.
  Returns:
    The Component Metadata object for the component with the specified component id.
  Throws:
    `NoSuchComponentException` - If no component with the specified component id is managed by this Blueprint Container.

### getMetadata

    Collection getMetadata(Class type)

  Return all `ComponentMetadata` objects of the specified Component Metadata type. The supported Component Metadata types are `ComponentMetadata` (which returns the Component Metadata for all defined manager types), `BeanMetadata` , `ServiceReferenceMetadata` (which returns both `ReferenceMetadata` and `ReferenceListMetadata` objects), and `ServiceMetadata`. The collection will include all Component Metadata objects of the requested type, including components that are declared inline.

  Parameters:
    `type` - The super type or type of the requested Component Metadata objects.
  Returns:
    An immutable collection of Component Metadata objects of the specified type.

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 © 2006-2010 Spring Framework. All Rights Reserved.