Type TransformFilterMaker
object
--+
|
TransformFilterMaker
Take a list of basic filters and makes a filter that transforms the
basic filter into a top-level filter. This is mostly useful for the
implementation of mkFilter, which should only be needed for special cases
or internal use by this library.
This object is useful for creating simple filters for services that
use one URI and are specified by one Type (we expect most Types will fit
this paradigm).
Creates a BasicServiceEndpoint object and apply the filter functions
to it until one of them returns a value.
Method Summary |
|
__init__ (self,
filter_functions)
Initialize the filter maker's state |
|
applyFilters (self,
endpoint)
Apply filter functions to an endpoint until one of them returns
non-None. |
|
getServiceEndpoints (self,
yadis_url,
service_element)
Returns an iterator of endpoint objects produced by the filter
functions. |
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__str__
|
__init__(self,
filter_functions)
(Constructor)
Initialize the filter maker's state
-
- Parameters:
filter_functions -
The endpoint transformer functions to apply to the basic
endpoint. These are called in turn until one of them does not
return None, and the result of that transformer is returned.
- Overrides:
__builtin__.object.__init__
|
applyFilters(self,
endpoint)
Apply filter functions to an endpoint until one of them returns
non-None.
-
|
getServiceEndpoints(self,
yadis_url,
service_element)
Returns an iterator of endpoint objects produced by the filter
functions.
-
|