public class ServiceImporter extends DependencyModel
DependencyModel.DependencyEventType, DependencyModel.ServiceBindingHolderBROKEN, DYNAMIC_BINDING_POLICY, DYNAMIC_PRIORITY_BINDING_POLICY, m_serviceReferenceManager, RESOLVED, STATIC_BINDING_POLICY, UNRESOLVED| Constructor and Description |
|---|
ServiceImporter(java.lang.Class specification,
org.osgi.framework.Filter filter,
boolean multiple,
boolean optional,
java.util.Comparator cmp,
int policy,
org.osgi.framework.BundleContext context,
java.lang.String identitity,
ServiceDependencyHandler handler)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
freeze()
Freeze the set of used provider.
|
java.lang.String |
getId() |
java.util.List |
getProviders()
Build the list of imported service provider.
|
boolean |
isFrozen() |
boolean |
isServiceLevelRequirement() |
void |
onDependencyReconfiguration(org.osgi.framework.ServiceReference[] departs,
org.osgi.framework.ServiceReference[] arrivals)
On Dependency Reconfiguration notification method.
|
void |
onServiceArrival(org.osgi.framework.ServiceReference ref)
A new service is injected by the tracker.
|
void |
onServiceDeparture(org.osgi.framework.ServiceReference ref)
A used service disappears.
|
void |
onServiceModification(org.osgi.framework.ServiceReference ref)
A used service is modified.
|
void |
setServiceLevelDependency()
Set that this dependency is a service level dependency.
|
void |
stop()
Stop the management of the import.
|
void |
unfreeze()
Unfreezes.
|
acquireReadLockIfNotHeld, acquireWriteLockIfNotHeld, addListener, applyReconfiguration, cleanup, getBindingPolicy, getBundleContext, getComparator, getComponentInstance, getContextSourceManager, getFilter, getService, getService, getServiceReference, getServiceReferenceManager, getServiceReferences, getSize, getSpecification, getState, getTracker, getUsedServiceReferences, invalidateMatchingServices, invalidateSelectedServices, isAggregate, isOptional, match, notifyListeners, onChange, releaseReadLockIfHeld, releaseWriteLockIfHeld, removeListener, setAggregate, setBundleContext, setComparator, setFilter, setOptionality, setSpecification, start, ungetServicepublic ServiceImporter(java.lang.Class specification,
org.osgi.framework.Filter filter,
boolean multiple,
boolean optional,
java.util.Comparator cmp,
int policy,
org.osgi.framework.BundleContext context,
java.lang.String identitity,
ServiceDependencyHandler handler)
specification - : targeted specificationfilter - : LDAP filtermultiple - : should the importer imports several services ?optional - : is the import optional ?cmp - : comparator to use for the trackingpolicy - : resolving policycontext - : bundle context to use for the tracking (can be a servie context)identitity - : requirement id (may be null)handler - : handlerpublic void freeze()
public void unfreeze()
unfreeze in class DependencyModelpublic boolean isFrozen()
isFrozen in class DependencyModelpublic void stop()
stop in class DependencyModelpublic java.util.List getProviders()
public void setServiceLevelDependency()
public java.lang.String getId()
getId in class DependencyModelpublic boolean isServiceLevelRequirement()
public void onDependencyReconfiguration(org.osgi.framework.ServiceReference[] departs,
org.osgi.framework.ServiceReference[] arrivals)
onDependencyReconfiguration in class DependencyModeldeparts - : leaving service references.arrivals - : new injected service references.DependencyModel.onDependencyReconfiguration(org.osgi.framework.ServiceReference[], org.osgi.framework.ServiceReference[])public void onServiceArrival(org.osgi.framework.ServiceReference ref)
onServiceArrival in class DependencyModelref - : new service reference.DependencyModel.onServiceArrival(org.osgi.framework.ServiceReference)public void onServiceDeparture(org.osgi.framework.ServiceReference ref)
onServiceDeparture in class DependencyModelref - : leaving service reference.DependencyModel.onServiceDeparture(org.osgi.framework.ServiceReference)public void onServiceModification(org.osgi.framework.ServiceReference ref)
onServiceModification in class DependencyModelref - : modified service reference.DependencyModel.onServiceModification(org.osgi.framework.ServiceReference)Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.