org.apache.felix.ipojo.composite.service.provides

## Class ServiceExporter

- java.lang.Object
- - org.apache.felix.ipojo.util.DependencyModel
  - - org.apache.felix.ipojo.composite.service.provides.ServiceExporter

    public class ServiceExporter
    extends DependencyModel

Export an service from the scope to the parent context.

Author:
  Felix Project Team

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.felix.ipojo.util.DependencyModel

`DependencyModel.DependencyEventType, DependencyModel.ServiceBindingHolder`

### Field Summary

### Fields inherited from class org.apache.felix.ipojo.util.DependencyModel

`BROKEN, DYNAMIC_BINDING_POLICY, DYNAMIC_PRIORITY_BINDING_POLICY, m_serviceReferenceManager, RESOLVED, STATIC_BINDING_POLICY, UNRESOLVED`

### Constructor Summary

Constructors
Constructor and Description
`ServiceExporter(java.lang.Class specification, org.osgi.framework.Filter filter, boolean multiple, boolean optional, java.util.Comparator cmp, int policy, ServiceContext from, org.osgi.framework.BundleContext dest, DependencyStateListener listener, CompositeManager manager)` Constructor.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `onDependencyReconfiguration(org.osgi.framework.ServiceReference[] departs, org.osgi.framework.ServiceReference[] arrivals)` On Dependency Reconfiguration notification method.
`void` `onServiceArrival(org.osgi.framework.ServiceReference reference)` A service has been injected.
`void` `onServiceDeparture(org.osgi.framework.ServiceReference reference)` An exported service disappears.
`void` `onServiceModification(org.osgi.framework.ServiceReference reference)` An exported service was modified.
`void` `stop()` Stop an exporter.

### Methods inherited from class org.apache.felix.ipojo.util.DependencyModel

`acquireReadLockIfNotHeld, acquireWriteLockIfNotHeld, addListener, applyReconfiguration, cleanup, getBindingPolicy, getBundleContext, getComparator, getComponentInstance, getContextSourceManager, getFilter, getId, getService, getService, getServiceReference, getServiceReferenceManager, getServiceReferences, getSize, getSpecification, getState, getTracker, getUsedServiceReferences, invalidateMatchingServices, invalidateSelectedServices, isAggregate, isFrozen, isOptional, match, notifyListeners, onChange, releaseReadLockIfHeld, releaseWriteLockIfHeld, removeListener, setAggregate, setBundleContext, setComparator, setFilter, setOptionality, setSpecification, start, unfreeze, ungetService`

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

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

### Constructor Detail

#### ServiceExporter

    public ServiceExporter(java.lang.Class specification,
                           org.osgi.framework.Filter filter,
                           boolean multiple,
                           boolean optional,
                           java.util.Comparator cmp,
                           int policy,
                           ServiceContext from,
                           org.osgi.framework.BundleContext dest,
                           DependencyStateListener listener,
                           CompositeManager manager)

Constructor.

Parameters:
  `specification` - : exported service specification.
  `filter` - : LDAP filter
  `multiple` - : is the export an aggregate export?
  `optional` - : is the export optional?
  `cmp` - : comparator to use in the dependency
  `policy` - : binding policy.
  `from` - : internal service context
  `dest` - : parent bundle context
  `listener` - : dependency lifecycle listener to notify when the dependency state change.
  `manager` - : composite manager

### Method Detail

#### stop

    public void stop()

Stop an exporter. Remove the service listener Unregister all exported services.

Overrides:
  `stop` in class `DependencyModel`

#### onServiceArrival

    public void onServiceArrival(org.osgi.framework.ServiceReference reference)

A service has been injected. Register it.

Specified by:
  `onServiceArrival` in class `DependencyModel`
Parameters:
  `reference` - : the new reference.
See Also:
  `TrackerCustomizer.addedService(org.osgi.framework.ServiceReference)`

#### onServiceModification

    public void onServiceModification(org.osgi.framework.ServiceReference reference)

An exported service was modified.

Specified by:
  `onServiceModification` in class `DependencyModel`
Parameters:
  `reference` - : modified reference
See Also:
  `TrackerCustomizer.modifiedService(org.osgi.framework.ServiceReference, java.lang.Object)`

#### onServiceDeparture

    public void onServiceDeparture(org.osgi.framework.ServiceReference reference)

An exported service disappears.

Specified by:
  `onServiceDeparture` in class `DependencyModel`
Parameters:
  `reference` - : service reference
See Also:
  `TrackerCustomizer.removedService(org.osgi.framework.ServiceReference, java.lang.Object)`

#### onDependencyReconfiguration

    public void onDependencyReconfiguration(org.osgi.framework.ServiceReference[] departs,
                                            org.osgi.framework.ServiceReference[] arrivals)

On Dependency Reconfiguration notification method.

Specified by:
  `onDependencyReconfiguration` in class `DependencyModel`
Parameters:
  `departs` - : leaving service references.
  `arrivals` - : new injected service references.
See Also:
  `DependencyModel.onDependencyReconfiguration(org.osgi.framework.ServiceReference[], org.osgi.framework.ServiceReference[])`