org.apache.felix.ipojo.dependency.interceptors

## Class DefaultServiceTrackingInterceptor

- java.lang.Object
- - org.apache.felix.ipojo.dependency.interceptors.DefaultDependencyInterceptor
  - - org.apache.felix.ipojo.dependency.interceptors.DefaultServiceTrackingInterceptor

All Implemented Interfaces:
  DependencyInterceptor, ServiceTrackingInterceptor

    public class DefaultServiceTrackingInterceptor
    extends DefaultDependencyInterceptor
    implements ServiceTrackingInterceptor

Default implementation of the default service tracking interceptor. It accepts all references and keeps the dependencies in the `dependencies` list. This list is guarded by the monitor lock. It also provides an `invalidateMatchingServices` method notifying all managed dependencies of a change in the matching service set.

### Field Summary

### Fields inherited from class org.apache.felix.ipojo.dependency.interceptors.DefaultDependencyInterceptor

`dependencies`

### Fields inherited from interface org.apache.felix.ipojo.dependency.interceptors.DependencyInterceptor

`TARGET_PROPERTY`

### Constructor Summary

Constructors
Constructor and Description
`DefaultServiceTrackingInterceptor()`

### Method Summary

All Methods Instance Methods Concrete Methods
`<S> TransformedServiceReference<S>` `accept(DependencyModel dependency, org.osgi.framework.BundleContext context, TransformedServiceReference<S> ref)` Default implementation of the accept method.
`void` `invalidateMatchingServices()` Notifies the managed dependencies of a change in the set of services accepted by this interceptor.

### Methods inherited from class org.apache.felix.ipojo.dependency.interceptors.DefaultDependencyInterceptor

`close, open`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface org.apache.felix.ipojo.dependency.interceptors.DependencyInterceptor

`close, open`

### Constructor Detail

#### DefaultServiceTrackingInterceptor

    public DefaultServiceTrackingInterceptor()

### Method Detail

#### accept

    public <S> TransformedServiceReference<S> accept(DependencyModel dependency,
                                                     org.osgi.framework.BundleContext context,
                                                     TransformedServiceReference<S> ref)

Default implementation of the accept method. The default behavior is to accept all services as they are (no transformation).

Specified by:
  `accept` in interface `ServiceTrackingInterceptor`
Type Parameters:
  `S` - the type of service
Parameters:
  `dependency` - the dependency the dependency
  `context` - the context of the dependency the bundle context used by the dependency
  `ref` - the reference the reference to accept, transform or reject
Returns:
  the reference as it is.

#### invalidateMatchingServices

    public void invalidateMatchingServices()

Notifies the managed dependencies of a change in the set of services accepted by this interceptor. The dependency will call the accept method to recompute the set of matching services.