Class: ConfigFilter

ConfigFilter()

new ConfigFilter()

ConfigFilter is an abstract base class for RegexNameFilter, etc. used by ValidatorConfig. The ValidatorConfig class consists of a set of rules. The Filter class is a part of a rule and is used to match a packet. Matched packets will be checked against the checkers defined in the rule.
Source:

Methods

(static) create(configSection) → {ConfigFilter}

Create a filter from the configuration section.
Parameters:
Name Type Description
configSection BoostInfoTree The section containing the definition of the filter, e.g. one of "validator.rule.filter".
Source:
Returns:
A new filter created from the configuration section.
Type
ConfigFilter

(static) createNameFilter_(configSection) → {ConfigFilter}

This is a helper for create() to create a filter from the configuration section which is type "name".
Parameters:
Name Type Description
configSection BoostInfoTree The section containing the definition of the filter.
Source:
Returns:
A new filter created from the configuration section.
Type
ConfigFilter

match(isForInterest, packetName) → {boolean}

Call the virtual matchName method based on the packet type.
Parameters:
Name Type Description
isForInterest boolean True if packetName is for an Interest, false if for a Data packet.
packetName Name The packet name. For a signed interest, the last two components are skipped but not removed.
Source:
Returns:
True for a match.
Type
boolean

matchName(packetName) → {boolean}

Implementation of the check for match.
Parameters:
Name Type Description
packetName Name The packet name, which is already stripped of signature components if this is a signed Interest name.
Source:
Returns:
True for a match.
Type
boolean