org.apache.felix.ipojo.api.composite

## Class ProvidedService

- java.lang.Object
- - org.apache.felix.ipojo.api.composite.ProvidedService

All Implemented Interfaces:
  HandlerConfiguration

    public class ProvidedService
    extends java.lang.Object
    implements HandlerConfiguration

Allows defining a provided service. A provided service is a service 'implemented' by the composite. This implementations relies (by delegation) on contained instances and services.

Author:
  Felix Project Team

### Field Summary

Fields
`static java.lang.String` `ALL_POLICY` Delegation policy: all.
`static java.lang.String` `ONE_POLICY` Delegation policy: one.

### Constructor Summary

Constructors
Constructor and Description
`ProvidedService()`

### Method Summary

All Methods Instance Methods Concrete Methods
`org.apache.felix.ipojo.metadata.Element` `getElement()` Gets the provided element.
`ProvidedService` `setDelegation(java.lang.String method, java.lang.String policy)` Sets the delegation policy of the given method.
`ProvidedService` `setSpecification(java.lang.String spec)` Sets the provided service specification.

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

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

### Field Detail

#### ALL_POLICY

    public static final java.lang.String ALL_POLICY

Delegation policy: all.

See Also:
  Constant Field Values

#### ONE_POLICY

    public static final java.lang.String ONE_POLICY

Delegation policy: one.

See Also:
  Constant Field Values

### Constructor Detail

#### ProvidedService

    public ProvidedService()

### Method Detail

#### getElement

    public org.apache.felix.ipojo.metadata.Element getElement()

Gets the provided element.

Specified by:
  `getElement` in interface `HandlerConfiguration`
Returns:
  the 'provides' element describing the current provided service.

#### setSpecification

    public ProvidedService setSpecification(java.lang.String spec)

Sets the provided service specification.

Parameters:
  `spec` - the specification
Returns:
  the current provided service.

#### setDelegation

    public ProvidedService setDelegation(java.lang.String method,
                                         java.lang.String policy)

Sets the delegation policy of the given method.

Parameters:
  `method` - the method name
  `policy` - the delegation policy
Returns:
  the current exported service.