public interface ServiceTrackingInterceptor extends DependencyInterceptor
|Modifier and Type||Method and Description|
Does the interceptor accepts the reference of not ? This methods has two goals.
<S> TransformedServiceReference<S> accept(DependencyModel dependency, 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 service
dependency- the dependency
context- the context of the dependency
ref- the reference
Copyright © 2014. All rights reserved.