Project

General

Profile

Actions

Feature #1275

closed

Face: separation of prefix registration and Interest filter

Added by Junxiao Shi almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Base
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
3.00 h

Description

Scenario

App wants to register a more general prefix, but make use of library's dispatch mechanism to invoke 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
Actions

Also available in: Atom PDF