Public Member Functions | |
Flosser () throws ConfigurationException, IOException | |
Constructors that called handleNamespace() now throwing NullPointerException as this doesn't exist yet. | |
Flosser (ContentName namespace) throws ConfigurationException, IOException | |
void | stopMonitoringNamespace (String namespace) throws MalformedContentNameStringException |
void | stopMonitoringNamespace (ContentName namespace) |
void | stopMonitoringNamespaces () |
void | setFlossSubNamespaces (boolean flag) |
void | handleNamespace (String namespace) throws MalformedContentNameStringException, IOException |
void | handleNamespace (ContentName namespace) throws IOException |
Handle a top-level namespace. | |
void | handleNamespace (ContentName namespace, ContentName parent) throws IOException |
Interest | handleContent (ContentObject result, Interest interest) |
Callback called when we get new results for our query. | |
void | stop () |
void | logNamespaces () |
Set< ContentName > | getNamespaces () |
Protected Member Functions | |
void | removeInterest (ContentName namespace) |
void | processContent (ContentObject result) |
Override in subclasses that want to do something more interesting than log. | |
Package Attributes | |
CCNHandle | _handle |
Map< ContentName, Interest > | _interests = new HashMap<ContentName, Interest>() |
Map< ContentName, Set < ContentName > > | _subInterests = new HashMap<ContentName, Set<ContentName>>() |
HashSet< ContentObject > | _processedObjects = new HashSet<ContentObject>() |
boolean | _flossSubNamespaces = false |
boolean | _shutdown = false |
A Flosser tries to pull all content written under a set of specified namespaces; essentially loading that content into ccnd. Based on ccnslurp, uses excludes to not get the same data back
By default does not floss namespaces below segments. This is because most commonly we will receive a file with a segmented namespace and no hierarchy below that. Trying to floss below this will lead to large numbers of unsatisfied interests being expressed, adversely affecting performance.
Call stopMonitoringNamespace as soon as you are done with a namespace to improve performance.
See CCNVersionedInputStream for related stream-based flossing code (basically a precursor to the full Flosser).
The "floss" term refers to "mental floss" -- think a picture of someone running dental floss in and out through their ears; here we are running content from an app, in through ccnd, to the flosser, so other parts of the (test) app can pull it back from ccnd later.
org.ccnx.ccn.test.Flosser.Flosser | ( | ) | throws ConfigurationException, IOException |
Constructors that called handleNamespace() now throwing NullPointerException as this doesn't exist yet.
ConfigurationException | ||
IOException |
void org.ccnx.ccn.test.Flosser.handleNamespace | ( | ContentName | namespace | ) | throws IOException |
Handle a top-level namespace.
namespace |
IOException |
Interest org.ccnx.ccn.test.Flosser.handleContent | ( | ContentObject | data, | |
Interest | interest | |||
) |
Callback called when we get new results for our query.
data | the ContentObject that matched our Interest | |
interest | Interest that was satisfied |
Implements org.ccnx.ccn.CCNContentHandler.
void org.ccnx.ccn.test.Flosser.processContent | ( | ContentObject | result | ) | [protected] |
Override in subclasses that want to do something more interesting than log.
result |