Class DependencyManager.SingleDynamicCustomizer
- java.lang.Object
-
- org.apache.felix.scr.impl.manager.DependencyManager.AbstractCustomizer
-
- org.apache.felix.scr.impl.manager.DependencyManager.SingleDynamicCustomizer
-
- All Implemented Interfaces:
DependencyManager.Customizer<S,T>,ServiceTrackerCustomizer<T,RefPair<S,T>,ExtendedServiceEvent>
- Enclosing class:
- DependencyManager<S,T>
private class DependencyManager.SingleDynamicCustomizer extends DependencyManager.AbstractCustomizer
-
-
Field Summary
Fields Modifier and Type Field Description private RefPair<S,T>refPairprivate inttrackingCount
-
Constructor Summary
Constructors Modifier Constructor Description privateSingleDynamicCustomizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddedService(org.osgi.framework.ServiceReference<T> serviceReference, RefPair<S,T> refPair, int trackingCount, int serviceCount, ExtendedServiceEvent event)RefPair<S,T>addingService(org.osgi.framework.ServiceReference<T> serviceReference)A service is being added to theServiceTracker.voidclose()private voidcloseRefPair()java.util.Collection<RefPair<S,T>>getRefs(java.util.concurrent.atomic.AtomicInteger trackingCount)voidmodifiedService(org.osgi.framework.ServiceReference<T> serviceReference, RefPair<S,T> refPair, int trackingCount, ExtendedServiceEvent event)A service tracked by theServiceTrackerhas been modified.booleanprebind(ComponentContextImpl<S> key)attempt to obtain the services from the tracked service references that will be used in inital bind calls before activation.voidremovedService(org.osgi.framework.ServiceReference<T> serviceReference, RefPair<S,T> refPair, int trackingCount, ExtendedServiceEvent event)A service tracked by theServiceTrackerhas been removed.-
Methods inherited from class org.apache.felix.scr.impl.manager.DependencyManager.AbstractCustomizer
deactivateTracker, getPreviousRefMap, getTracker, isActive, isSatisfied, isTrackerOpened, setPreviousRefMap, setTracker, setTrackerOpened, tracked, ungetService
-
-
-
-
Method Detail
-
addingService
public RefPair<S,T> addingService(org.osgi.framework.ServiceReference<T> serviceReference)
Description copied from interface:ServiceTrackerCustomizerA service is being added to theServiceTracker.This method is called before a service which matched the search parameters of the
ServiceTrackeris added to theServiceTracker. This method should return the service object to be tracked for the specifiedServiceReference. The returned service object is stored in theServiceTrackerand is available from thegetServiceandgetServicesmethods.- Parameters:
serviceReference- The reference to the service being added to theServiceTracker.- Returns:
- The service object to be tracked for the specified referenced
service or
nullif the specified referenced service should not be tracked.
-
addedService
public void addedService(org.osgi.framework.ServiceReference<T> serviceReference, RefPair<S,T> refPair, int trackingCount, int serviceCount, ExtendedServiceEvent event)
-
modifiedService
public void modifiedService(org.osgi.framework.ServiceReference<T> serviceReference, RefPair<S,T> refPair, int trackingCount, ExtendedServiceEvent event)
Description copied from interface:ServiceTrackerCustomizerA service tracked by theServiceTrackerhas been modified.This method is called when a service being tracked by the
ServiceTrackerhas had it properties modified.- Parameters:
serviceReference- The reference to the service that has been modified.refPair- The service object for the specified referenced service.event- TODO
-
removedService
public void removedService(org.osgi.framework.ServiceReference<T> serviceReference, RefPair<S,T> refPair, int trackingCount, ExtendedServiceEvent event)
Description copied from interface:ServiceTrackerCustomizerA service tracked by theServiceTrackerhas been removed.This method is called after a service is no longer being tracked by the
ServiceTracker.- Parameters:
serviceReference- The reference to the service that has been removed.refPair- The service object for the specified referenced service.event- TODO
-
prebind
public boolean prebind(ComponentContextImpl<S> key)
Description copied from interface:DependencyManager.Customizerattempt to obtain the services from the tracked service references that will be used in inital bind calls before activation.- Parameters:
key- TODO- Returns:
- true if there are enough services for activation.
-
close
public void close()
-
closeRefPair
private void closeRefPair()
-
-