rsb.filter¶
Contains filters which can be used to restrict the events received by clients.
Code author: jwienke
Code author: jmoringe
Classes
Interface for concrete filters. |
|
|
Filter events based on their cause vectors. |
An enumeration. |
|
|
Match events do (not) have a particular value in their method field. |
|
Matching events have to originate at a particular participant. |
|
A filter to restrict the scope for events. |
-
class
rsb.filter.AbstractFilter¶ Bases:
objectInterface for concrete filters.
Code author: jwienke
-
match(event)¶ Match this filter against a given event.
- Parameters
event – event to match against
- Returns
True if this filter matches the event, else False
-
-
class
rsb.filter.CauseFilter(cause, invert=False)¶ Bases:
rsb.filter.AbstractFilterFilter events based on their cause vectors.
Code author: jmoringe
Create a new instance.
- Parameters
cause – The id of the
Eventthat should be in the cause vector of matching events.invert – Controls whether matching results should inverted (i.e. matching events that do
nothave the specified event id in their cause vector).
- Type invert
bool
-
match(event)¶ Match this filter against a given event.
- Parameters
event – event to match against
- Returns
True if this filter matches the event, else False
-
property
cause¶
-
property
invert¶
-
class
rsb.filter.FalseFilter¶ Bases:
rsb.filter.AbstractFilter-
match(event)¶ Match this filter against a given event.
- Parameters
event – event to match against
- Returns
True if this filter matches the event, else False
-
-
class
rsb.filter.MethodFilter(method, invert=False)¶ Bases:
rsb.filter.AbstractFilterMatch events do (not) have a particular value in their method field.
Code author: jmoringe
Create a new instance.
- Parameters
method – The method string that matching events have to have in their method field.
invert – Controls whether matching results should inverted (i.e. matching events
nothavingmethodin their method field).
- Type method
str
- Type invert
bool
-
match(event)¶ Match this filter against a given event.
- Parameters
event – event to match against
- Returns
True if this filter matches the event, else False
-
property
invert¶
-
property
method¶
-
class
rsb.filter.OriginFilter(origin, invert=False)¶ Bases:
rsb.filter.AbstractFilterMatching events have to originate at a particular participant.
Code author: jmoringe
Create a new instance.
- Parameters
origin – The id of the
Participantfrom which matching events should originate.invert – Controls whether matching results should inverted (i.e. matching events
notoriginating formorigin).
- Type invert
bool
-
match(event)¶ Match this filter against a given event.
- Parameters
event – event to match against
- Returns
True if this filter matches the event, else False
-
property
invert¶
-
property
origin¶
-
class
rsb.filter.RecordingFalseFilter¶ Bases:
rsb.filter.AbstractFilter-
match(event)¶ Match this filter against a given event.
- Parameters
event – event to match against
- Returns
True if this filter matches the event, else False
-
-
class
rsb.filter.RecordingTrueFilter¶ Bases:
rsb.filter.AbstractFilter-
match(event)¶ Match this filter against a given event.
- Parameters
event – event to match against
- Returns
True if this filter matches the event, else False
-
-
class
rsb.filter.ScopeFilter(scope)¶ Bases:
rsb.filter.AbstractFilterA filter to restrict the scope for events.
Code author: jwienke
Construct a new scope filter with a given scope to restrict to.
- Parameters
scope – top-level scope to accept and al child scopes
-
match(event)¶ Match this filter against a given event.
- Parameters
event – event to match against
- Returns
True if this filter matches the event, else False
-
property
scope¶ Return the top-level scope this filter matches for.
- Returns
scope
-
class
rsb.filter.TrueFilter¶ Bases:
rsb.filter.AbstractFilter-
match(event)¶ Match this filter against a given event.
- Parameters
event – event to match against
- Returns
True if this filter matches the event, else False
-