Project

General

Profile

Actions

Task #3590

closed

MemoryContentCache: Support setInterestFilter

Added by Anonymous about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
04/06/2016
Due date:
% Done:

0%

Estimated time:

Description

The Face API has been updated to support setInterestFilter, separate from registerPrefix. MemoryContentCache should support setting an interest filter also. This allows having multiple MemoryContentCache objects to hold Data packets under different namespaces (without needing to register prefix with the forwarder for each namespace.)

Proposal: Add a setInterestFilter method which takes a prefix or interestFilter (like in Face.setInterestFilter) plus the optional onDataNotFound callback (same as MemoryContentCache.registerPrefix). Therefore, the application calls Face.registerPrefix, then supplies the face to the MemoryContentCache constructor, then calls MemoryContentCache.setInterestFilter. It is not necessary to call MemoryContentCache.registerPrefix.

Note: When MemoryContentCache.onInterest doesn't find the data packet, it calls the onDataNotFound callback based on the supplied prefix. It is possible that there are multiple InterestFilters for the same prefix, but for now we don't distinguish these.

Actions

Also available in: Atom PDF