Feature #2566
closed
Implement Face.setInterestFilter
Added by Alex Afanasyev over 9 years ago.
Updated over 9 years ago.
Description
There should be at least two forms of this method:
// atomic set interest filter (only internal face dispatch)
Id
ndn::Face::setInterestFilter(InterestFilter interestFilter, OnInterest onInterest);
// combined register prefix + set interest filter
Id
ndn::Face::setInterestFilter(InterestFilter interestFilter, OnInterest onInterest,
RegisterPrefixSuccessCallback onSuccess,
RegisterPrefixFailureCallback onFailure,
uint64_t flags)
- Project changed from jndn to NDN-CCL
Could you explain why?
Moving to NDN-CCL unless there is a reason to only look at this in jNDN.
One form (2) is a convenience method to do prefix registration and setting up dispatch.
Form (1) is just to set up dispatch. In several applications (NLSR as an example), application needs to just register one prefix with NFD. How specific interests are handled is determined by the dispatch mechanism inside Face.
(a question from a related issue) Should setInterestFilter follow the behavior of child inherit and capture which were provided in the flags to registerPrefix?
My opinion is that it shouldn't. These are flags for RIB/FIB. The application dispatch can always use InterestFilter to specify precisely what kind of names the callback should receive.
- Assignee set to Anonymous
This form of unsetInterestFilter is a convenience alias for unregisterPrefix. It also matches convenience version of setInterestFilter that combines prefix registration and setting up callback dispatch.
In my opinion, this is correct and desired behavior.
- Status changed from New to In Progress
Merged the jNDN branch issue/2566-setInterestFilter into master.
The same changes to the other libraries are in progress.
- % Done changed from 0 to 80
Updated NDN-CPP and PyNDN.
- Status changed from In Progress to Closed
- % Done changed from 80 to 100
Updated in all libraries.
Also available in: Atom
PDF