public final class LocatorFilter extends ServiceFilter
LocatorFilter represents a ServiceFilter
based on a set of locators. A ServiceList resulting
from this filter will include only services matching the specified
locators.Locator,
ServiceList| Constructor and Description |
|---|
LocatorFilter(Locator[] locators)
Constructs the filter based on a set of locators.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(Service service)
Tests if the given service passes the filter.
|
Locator[] |
getFilterValue()
Reports the locators used to create this filter.
|
public LocatorFilter(Locator[] locators) throws InvalidLocatorException
locators - An array of locators representing services
to be included in a resulting ServiceList.InvalidLocatorException - If one of the given
locators does not reference a valid
Service.public Locator[] getFilterValue()
public boolean accept(Service service)
accept in class ServiceFilterservice - An individual Service to be evaluated
against the filtering algorithm.true if service belongs to the
set of locators indicated by the filter value; false
otherwise.Copyright © 2012 code4tv.com. All Rights Reserved.