Project

General

Profile

Feature #1275

Updated by Junxiao Shi about 10 years ago

## Scenario 

 App wants to register a more general prefix, but make use of library's dispatch mechanism to invoke income different handler based on Name. 

 ## Proposed change 

 Have two methods on Face class: 

 * `RegisteredPrefix* registerPrefix(Name, successCallback, failureCallback)`   
   Send a prefix registration command using NRD Prefix Registration protocol.   
   The return value allows app to unregister the prefix. 
 * `InterestFilter* setInterestFilter(Name, interestHandler)`   
   Cause Face to dispatch Interest under Name to interestHandler.   
   The return value allows app to cancel the filter. 

 To get Interest into an handler, app needs to: 

 1. registerPrefix to get Interest into the Face 
 2. setInterestFilter to get Interest into the handler 

Back