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

java.lang.Object
  extended by org.apache.felix.ipojo.util.DependencyModel
      extended by org.apache.felix.ipojo.composite.service.provides.ServiceExporter
All Implemented Interfaces:
TrackerCustomizer

public class ServiceExporter
extends DependencyModel

Export an service from the scope to the parent context.

Author:
Felix Project Team

Field Summary
 
Fields inherited from class org.apache.felix.ipojo.util.DependencyModel
BROKEN, DYNAMIC_BINDING_POLICY, DYNAMIC_PRIORITY_BINDING_POLICY, RESOLVED, STATIC_BINDING_POLICY, UNRESOLVED
 
Constructor Summary
ServiceExporter(Class specification, Filter filter, boolean multiple, boolean optional, Comparator cmp, int policy, ServiceContext from, BundleContext dest, DependencyStateListener listener, CompositeManager manager)
          Constructor.
 
Method Summary
 void onDependencyReconfiguration(ServiceReference[] departs, ServiceReference[] arrivals)
          On Dependency Reconfiguration notification method.
 void onServiceArrival(ServiceReference reference)
          A service has been injected.
 void onServiceDeparture(ServiceReference reference)
          An exported service disappears.
 void onServiceModification(ServiceReference reference)
          An exported service was modified.
 void stop()
          Stop an exporter.
 
Methods inherited from class org.apache.felix.ipojo.util.DependencyModel
addedService, addingService, getBindingPolicy, getComparator, getComparator, getFilter, getPolicy, getService, getServiceReference, getServiceReferences, getSize, getSpecification, getState, getUsedServiceReferences, isAggregate, isFrozen, isOptional, loadSpecification, manageModification, match, modifiedService, removedService, setAggregate, setBindingPolicy, 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(Class specification,
                       Filter filter,
                       boolean multiple,
                       boolean optional,
                       Comparator cmp,
                       int policy,
                       ServiceContext from,
                       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(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(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(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(ServiceReference[] departs,
                                        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[])


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.