The
ServiceItemFilter
interface defines the methods used by an object such as the {@link net.jini.lookup.ServiceDiscoveryManager ServiceDiscoveryManager} or the {@link net.jini.lookup.LookupCache LookupCache} to apply additional selection criteria when searching forservices in which an entity has registered interest. It is the responsibility of the entity requesting the application of additional criteria to construct an implementation of this interface that defines the additional criteria, and to pass the resulting object (referred to as a
filter) into the object that will apply it.
The filtering mechanism provided by implementations of this interface is particularly useful to entities that wish to extend the capabilities of the standard template matching scheme. For example, because template matching does not allow one to search for services based on a range of attribute values, this additional matching mechanism can be exploited by the entity to ask the managing object to find all registered printer services that have a resolution attribute between say, 300 dpi and 1200 dpi.
In addition to (or instead of) applying additional matching criteria to candidate service proxies initially found through template matching, this filtering mechanism can also be used to extend the selection process so that only proxies that are safe to use are returned to the entity. To do this, the entity would use this interface to supply the {@link net.jini.lookup.ServiceDiscoveryManager ServiceDiscoveryManager}or {@link net.jini.lookup.LookupCache LookupCache} with a filter that,when applied to a candidate proxy, performs a set of operations that is referred to as proxy preparation. As described in the documentation for {@link net.jini.security.ProxyPreparer}, proxy preparation typically includes operations such as, verifying trust in the proxy, specifying client constraints, and dynamically granting necessary permissions to the proxy.
@author Sun Microsystems, Inc.
@see ServiceDiscoveryManager