org.apache.felix.ipojo.composite.service.instantiator

## Class ServiceDependencyHandler

- java.lang.Object
- - org.apache.felix.ipojo.Handler
  - - org.apache.felix.ipojo.composite.CompositeHandler
    - - org.apache.felix.ipojo.composite.service.instantiator.ServiceDependencyHandler

All Implemented Interfaces:
  DependencyStateListener

    public class ServiceDependencyHandler
    extends CompositeHandler
    implements DependencyStateListener

Service Instantiator Class. This handler allows to instantiate service instance inside the composition.

Author:
  Felix Project Team

### Field Summary

### Fields inherited from class org.apache.felix.ipojo.composite.CompositeHandler

`HANDLER_TYPE`

### Fields inherited from class org.apache.felix.ipojo.Handler

`HANDLER_LEVEL_PROPERTY, HANDLER_NAME_PROPERTY, HANDLER_NAMESPACE_PROPERTY, HANDLER_TYPE_PROPERTY, m_instance, m_isValid`

### Constructor Summary

Constructors
Constructor and Description
`ServiceDependencyHandler()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `configure(org.apache.felix.ipojo.metadata.Element metadata, java.util.Dictionary conf)` Configure the handler.
`HandlerDescription` `getDescription()` Get the service instantiator handler description.
`java.util.List` `getInstances()`
`java.util.List` `getRequirements()`
`void` `invalidate(DependencyModel dep)` A service instance becomes invalid.
`void` `start()` Start the service instantiator handler.
`void` `stateChanged(int newState)` State change callback.
`void` `stop()` Handler stop method.
`void` `validate(DependencyModel dep)` An service instance becomes valid.

### Methods inherited from class org.apache.felix.ipojo.composite.CompositeHandler

`attach, getCompositeManager, getHandler, getLogger, setFactory`

### Methods inherited from class org.apache.felix.ipojo.Handler

`debug, error, error, getHandlerManager, getValidity, info, initializeComponentFactory, isValid, reconfigure, setValidity, warn, warn`

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

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

### Constructor Detail

#### ServiceDependencyHandler

    public ServiceDependencyHandler()

### Method Detail

#### configure

    public void configure(org.apache.felix.ipojo.metadata.Element metadata,
                          java.util.Dictionary conf)
                   throws ConfigurationException

Configure the handler.

Specified by:
  `configure` in class `Handler`
Parameters:
  `metadata` - : the metadata of the component
  `conf` - : the instance configuration
Throws:
  `ConfigurationException` - : the specification attribute is missing
See Also:
  `Handler.configure(org.apache.felix.ipojo.metadata.Element, java.util.Dictionary)`

#### start

    public void start()

Start the service instantiator handler. Start all created service instance.

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

#### stop

    public void stop()

Handler stop method. Stop all created service instance.

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

#### stateChanged

    public void stateChanged(int newState)

State change callback. This method is used to freeze the set of used provider if the static binding policy is used.

Overrides:
  `stateChanged` in class `Handler`
Parameters:
  `newState` - : the new state of the underlying instance
See Also:
  `Handler.stateChanged(int)`

#### validate

    public void validate(DependencyModel dep)

An service instance becomes valid.

Specified by:
  `validate` in interface `DependencyStateListener`
Parameters:
  `dep` - : dependency becoming valid.

#### invalidate

    public void invalidate(DependencyModel dep)

A service instance becomes invalid.

Specified by:
  `invalidate` in interface `DependencyStateListener`
Parameters:
  `dep` - : dependency becoming valid.

#### getDescription

    public HandlerDescription getDescription()

Get the service instantiator handler description.

Overrides:
  `getDescription` in class `Handler`
Returns:
  the description
See Also:
  `Handler.getDescription()`

#### getInstances

    public java.util.List getInstances()

#### getRequirements

    public java.util.List getRequirements()