org.ccnx.ccn.test.CCNLibraryTestHarness Class Reference

An enhanced CCNHandle used for logging/tracking during tests. More...

Inheritance diagram for org.ccnx.ccn.test.CCNLibraryTestHarness:

org.ccnx.ccn.CCNHandle org.ccnx.ccn.CCNBase

List of all members.

Public Member Functions

void reset ()
Queue< ContentObjectgetOutputQueue ()
ContentObject put (ContentObject co) throws IOException
 Put a single content object into the network.
void registerFilter (ContentName filter, CCNInterestHandler handler)
 Register a standing interest filter with callback to receive any matching interests seen.
void unregisterFilter (ContentName filter, CCNInterestHandler handler)
 Unregister a standing interest filter.
ContentObject get (Interest interest, long timeout) throws IOException
 Get a single piece of content from CCN.
ContentObject get (ContentName name, long timeout) throws IOException
 Helper method wrapped around CCNBase.get(Interest, long).


Detailed Description

An enhanced CCNHandle used for logging/tracking during tests.

Member Function Documentation

ContentObject org.ccnx.ccn.test.CCNLibraryTestHarness.put ( ContentObject  co  )  throws IOException

Put a single content object into the network.

This is a low-level put, and typically should only be called by a flow controller, in response to a received Interest. Attempting to write to ccnd without having first received a corresponding Interest violates flow balance, and the content will be dropped.

Parameters:
co the content object to write. This should be complete and well-formed -- signed and so on.
Returns:
the object that was put if successful, otherwise null.
Exceptions:
IOException 

Reimplemented from org.ccnx.ccn.CCNHandle.

void org.ccnx.ccn.test.CCNLibraryTestHarness.registerFilter ( ContentName  filter,
CCNInterestHandler  callbackHandler 
)

Register a standing interest filter with callback to receive any matching interests seen.

Parameters:
filter 
callbackHandler 

Reimplemented from org.ccnx.ccn.CCNHandle.

void org.ccnx.ccn.test.CCNLibraryTestHarness.unregisterFilter ( ContentName  filter,
CCNInterestHandler  callbackHandler 
)

Unregister a standing interest filter.

Parameters:
filter 
callbackHandler 
Exceptions:
IOException if handle is closed

Reimplemented from org.ccnx.ccn.CCNHandle.

ContentObject org.ccnx.ccn.test.CCNLibraryTestHarness.get ( Interest  interest,
long  timeout 
) throws IOException

Get a single piece of content from CCN.

This is a blocking get, it will return when matching content is found or it times out, whichever comes first.

Parameters:
interest 
timeout 
Returns:
the content object
Exceptions:
IOException 

Reimplemented from org.ccnx.ccn.CCNHandle.

ContentObject org.ccnx.ccn.test.CCNLibraryTestHarness.get ( ContentName  name,
long  timeout 
) throws IOException

Helper method wrapped around CCNBase.get(Interest, long).

Parameters:
name name to query for
timeout timeout for get
Returns:
the object retrieved, or null if timed out
Exceptions:
IOException on error
See also:
CCNBase.get(Interest, long)

Reimplemented from org.ccnx.ccn.CCNHandle.


The documentation for this class was generated from the following file:

Generated on Thu Feb 16 00:45:07 2012 for Content-Centric Networking in Java by  doxygen 1.5.6