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. |
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.
static void org.ccnx.ccn.utils.ccnlsrepo.main | ( | String[] | args | ) | [static] |
Main function for the ccnlsrepo tool.
Initializes the tool and triggers name enumeration.
args | Command line arguments: prefix to enumeration and timeout flag (and time in ms) |
void org.ccnx.ccn.utils.ccnlsrepo.usage | ( | ) |
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.
prefix | The registered prefix for the returned names. | |
names | Returned names matching the prefix. |
Implements org.ccnx.ccn.profiles.nameenum.BasicNameEnumeratorListener.