org.apache.felix.ipojo.api.composite

## Class CompositeComponentType

- java.lang.Object
- - org.apache.felix.ipojo.api.ComponentType
  - - org.apache.felix.ipojo.api.composite.CompositeComponentType

    public class CompositeComponentType
    extends ComponentType

Allows defining composite types.

Author:
  Felix Project Team

### Constructor Summary

Constructors
Constructor and Description
`CompositeComponentType()`

### Method Summary

All Methods Instance Methods Concrete Methods
`CompositeComponentType` `addHandler(HandlerConfiguration handler)` Adds an HandlerConfiguration to the component type.
`CompositeComponentType` `addInstance(Instance inst)` Adds a contained instance.
`CompositeComponentType` `addService(ExportedService es)` Adds an exported service.
`CompositeComponentType` `addService(ProvidedService es)` Adds a provided service.
`CompositeComponentType` `addSubService(ImportedService is)` Adds an imported (sub-)service.
`CompositeComponentType` `addSubService(InstantiatedService is)` Adds an instantiated sub-service.
`Factory` `getFactory()` Gets the component factory.
`CompositeComponentType` `setBundleContext(org.osgi.framework.BundleContext bc)` Sets the bundle context.
`CompositeComponentType` `setComponentTypeName(java.lang.String name)` Sets the component type name.
`CompositeComponentType` `setComponentTypeVersion(java.lang.String version)` Sets the component type version.
`CompositeComponentType` `setPublic(boolean visible)` Sets the factory public aspect.
`void` `start()` Starts the component type.
`void` `stop()` Stops the component type.

### Methods inherited from class org.apache.felix.ipojo.api.ComponentType

`createInstance, createInstance, createInstance, disposeInstance, disposeInstance, getInstanceByName`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### CompositeComponentType

    public CompositeComponentType()

### Method Detail

#### getFactory

    public Factory getFactory()

Gets the component factory.

Specified by:
  `getFactory` in class `ComponentType`
Returns:
  the factory attached to this component type.
See Also:
  `ComponentType.getFactory()`

#### start

    public void start()

Starts the component type.

Specified by:
  `start` in class `ComponentType`
See Also:
  `ComponentType.start()`

#### stop

    public void stop()

Stops the component type.

Specified by:
  `stop` in class `ComponentType`
See Also:
  `ComponentType.stop()`

#### setBundleContext

    public CompositeComponentType setBundleContext(org.osgi.framework.BundleContext bc)

Sets the bundle context.

Parameters:
  `bc` - the bundle context
Returns:
  the current component type

#### setPublic

    public CompositeComponentType setPublic(boolean visible)

Sets the factory public aspect.

Parameters:
  `visible` - `false` to create a private factory.
Returns:
  the current component type

#### setComponentTypeName

    public CompositeComponentType setComponentTypeName(java.lang.String name)

Sets the component type name.

Parameters:
  `name` - the factory name
Returns:
  the current component type

#### setComponentTypeVersion

    public CompositeComponentType setComponentTypeVersion(java.lang.String version)

Sets the component type version.

Parameters:
  `version` - the factory version or "bundle" to use the bundle version.
Returns:
  the current component type

#### addInstance

    public CompositeComponentType addInstance(Instance inst)

Adds a contained instance.

Parameters:
  `inst` - the instance to add
Returns:
  the current composite component type

#### addSubService

    public CompositeComponentType addSubService(ImportedService is)

Adds an imported (sub-)service.

Parameters:
  `is` - the imported service to add
Returns:
  the current composite component type

#### addSubService

    public CompositeComponentType addSubService(InstantiatedService is)

Adds an instantiated sub-service.

Parameters:
  `is` - the instantiated service to add
Returns:
  the current composite component type

#### addService

    public CompositeComponentType addService(ExportedService es)

Adds an exported service.

Parameters:
  `es` - the exported service to add
Returns:
  the current composite component type

#### addService

    public CompositeComponentType addService(ProvidedService es)

Adds a provided service.

Parameters:
  `es` - the provided service to add
Returns:
  the current composite component type

#### addHandler

    public CompositeComponentType addHandler(HandlerConfiguration handler)

Adds an HandlerConfiguration to the component type. Each component type implementation must uses the populated list (m_handlers) when generating the component metadata.

Parameters:
  `handler` - the handler configuration to add
Returns:
  the current component type.