org.ccnx.ccn.utils.ccnlsrepo Class Reference

Java utility to explore content stored under a given prefix in a repository. More...

List of all members.

Public Member Functions

void usage ()
 Function to print out the options for ccnlsrepo.
int handleNameEnumerator (ContentName prefix, ArrayList< ContentName > names)
 Callback method to handle names returned through enumeration.

Static Public Member Functions

static void main (String[] args)
 Main function for the ccnlsrepo tool.

Detailed Description

Java utility to explore content stored under a given prefix in a repository.

Uses name enumeration to limit responses to repositories and other NE responders. The program defaults to a prefix of "/" but takes a prefix as the first command-line argument. The tool displays names under the prefix after collecting names for a given time period. The initial default setting is 2 seconds. To enumerate names for more than 2 seconds (for example, if you have a long round trip time to a repository, the time can be extended using the -timeout flag and the time to wait in milliseconds. Another option is to have a long running enumeration that outputs results as they are received at the client. This is triggered with the -c flag. The tool utilizes the basic name enumeration protocol and currently does not properly handle responses from multiple repositories. If this is run with multiple repositories responding, it will not crash, it just may not receive all of the information from each repository.


Member Function Documentation

int org.ccnx.ccn.utils.ccnlsrepo.handleNameEnumerator ( ContentName  prefix,
ArrayList< ContentName names 
)

Callback method to handle names returned through enumeration.

Adds all names not already in the stored list to be printed out before the program exits. In the case of a long-running iteration (called with -c), the names are printed out as they are returned in enumeration responses.

Parameters:
prefix The registered prefix for the returned names.
names Returned names matching the prefix.
Returns:
int Number of names in the collection. (currently unused in this implementation)
See also:
org.ccnx.ccn.profiles.nameenum.BasicNameEnumeratorListener

Implements org.ccnx.ccn.profiles.nameenum.BasicNameEnumeratorListener.

static void org.ccnx.ccn.utils.ccnlsrepo.main ( String[]  args  )  [static]

Main function for the ccnlsrepo tool.

Initializes the tool and triggers name enumeration.

Parameters:
args Command line arguments: prefix to enumeration and timeout flag (and time in ms)
Returns:
void
void org.ccnx.ccn.utils.ccnlsrepo.usage (  ) 

Function to print out the options for ccnlsrepo.

Returns:
void

The documentation for this class was generated from the following file:
Generated on Fri May 13 16:27:57 2011 for Content-Centric Networking in Java by  doxygen 1.6.3