public interface ServiceTrackingInterceptor extends DependencyInterceptor
TARGET_PROPERTY
Modifier and Type | Method and Description |
---|---|
<S> TransformedServiceReference<S> |
accept(DependencyModel dependency,
org.osgi.framework.BundleContext context,
TransformedServiceReference<S> ref)
Does the interceptor accepts the reference of not ?
This methods has two goals.
|
close, open
<S> TransformedServiceReference<S> accept(DependencyModel dependency, org.osgi.framework.BundleContext context, TransformedServiceReference<S> ref)
TransformedServiceReference
,
but with the new set of properties.
So to filter out the service, return null. To accept the service,
return the reference as it is. To transform the service update the service reference and return it.
When several interceptors are collaborating on the same dependency, a chain is created. The received reference
is the reference modified by the preceding interceptor. Notice that once an interceptor returns null the chain is interrupted and the service rejected.S
- the type of servicedependency
- the dependencycontext
- the context of the dependencyref
- the referenceCopyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.