org.eclipse.ecf.osgi.services.discovery
Interface DiscoveredServiceTracker


Deprecated. This interface is deprecated because at the time of ECF 3.0/Galileo release, it seems likely that this class will be moved, or renamed, or undergo major changes after the release of ECF 3.0. This deprecation is therefore intended as a notice to consumers about these upcoming changes in the RFC119 specification, and the consequent changes to these OSGi-defined classes.

public interface DiscoveredServiceTracker

Interface of trackers for discovered remote services.

When a service implementing this interface is registered with the framework, then Discovery will notify it about remote services matching one of the provided criteria and will keep notifying it on changes of information known to Discovery regarding this services. Discovery may deliver notifications on discovered services to a DiscoveredServiceTracker out of order and may concurrently call and/or reenter a DiscoveredServiceTracker.

Version:
$Revision: 1.2 $

Field Summary
static java.lang.String FILTER_MATCH_CRITERIA
          Deprecated. Optional ServiceRegistration property which contains filters for services this tracker is interested in.
static java.lang.String INTERFACE_MATCH_CRITERIA
          Deprecated. Optional ServiceRegistration property which contains service interfaces this tracker is interested in.
 
Method Summary
 void serviceChanged(DiscoveredServiceNotification notification)
          Deprecated. Receives notification that information known to Discovery regarding a remote service has changed.
 

Field Detail

INTERFACE_MATCH_CRITERIA

static final java.lang.String INTERFACE_MATCH_CRITERIA
Deprecated. 
Optional ServiceRegistration property which contains service interfaces this tracker is interested in.

Value of this property is of type Collection (<String>). May be null or empty.

See Also:
Constant Field Values

FILTER_MATCH_CRITERIA

static final java.lang.String FILTER_MATCH_CRITERIA
Deprecated. 
Optional ServiceRegistration property which contains filters for services this tracker is interested in.

Note that these filters need to take into account service publication properties which are not necessarily the same as properties under which a service is registered. See ServicePublication for some standard properties used to publish service metadata.

The following sample filter will make Discovery notify the DiscoveredServiceTracker about services providing interface 'my.company.foo' of version '1.0.1.3': "(&(service.interface=my.company.foo)(service.interface.version=my.company.foo|1.0.1.3))".

Value of this property is of type Collection (<String>). May be null. or empty

See Also:
Constant Field Values
Method Detail

serviceChanged

void serviceChanged(DiscoveredServiceNotification notification)
Deprecated. 
Receives notification that information known to Discovery regarding a remote service has changed.

The tracker is only notified about remote services which fulfill the matching criteria, either one of the interfaces or one of the filters, provided as properties of this service.

If multiple criteria match, then the tracker is notified about each of them. This can be done either by a single notification callback or by multiple subsequent ones.

Parameters:
notification - the DiscoveredServiceNotification object describing the change. Is never null.