Class: InterestFilterTable

InterestFilterTable

new InterestFilterTable()

An InterestFilterTable is an internal class to hold a list of entries with an interest Filter and its OnInterestCallback.
Source:

Classes

Entry

Methods

getMatchedFilters(interest, matchedFilters)

Find all entries from the interest filter table where the interest conforms to the entry's filter, and add to the matchedFilters list.
Parameters:
Name Type Description
interest Interest The interest which may match the filter in multiple entries.
matchedFilters Array.<InterestFilterTable.Entry> Add each matching InterestFilterTable.Entry from the interest filter table. The caller should pass in an empty array.
Source:

setInterestFilter(interestFilterId, filter, onInterest, face)

Add a new entry to the table.
Parameters:
Name Type Description
interestFilterId number The ID from Node.getNextEntryId().
filter InterestFilter The InterestFilter for this entry.
onInterest function The callback to call.
face Face The face on which was called registerPrefix or setInterestFilter which is passed to the onInterest callback.
Source:

unsetInterestFilter(interestFilterId)

Remove the interest filter entry which has the interestFilterId from the interest filter table. This does not affect another interest filter with a different interestFilterId, even if it has the same prefix name. If there is no entry with the interestFilterId, do nothing.
Parameters:
Name Type Description
interestFilterId number The ID returned from setInterestFilter.
Source: