org.ccnx.ccn.CCNBase Interface Reference

This is the lowest-level interface to CCN, and describes in its entirety, the interface the library has to speak to the CCN network layer. More...

List of all members.

Public Member Functions

ContentObject put (ContentObject co) throws IOException
 Put a single content object into the network.
ContentObject get (Interest interest, long timeout) throws IOException
 Get a single piece of content from CCN.
void registerFilter (ContentName filter, CCNFilterListener callbackListener) throws IOException
 Register a standing interest filter with callback to receive any matching interests seen.
void unregisterFilter (ContentName filter, CCNFilterListener callbackListener)
 Unregister a standing interest filter.
void expressInterest (Interest interest, CCNInterestListener listener) throws IOException
 Query, or express an interest in particular content.
void cancelInterest (Interest interest, CCNInterestListener listener)
 Cancel this interest.

Detailed Description

This is the lowest-level interface to CCN, and describes in its entirety, the interface the library has to speak to the CCN network layer.

It consists of only a small number of methods, all other operations in CCN are built on top of these methods together with the constraint specifications allowed by Interest.

Clients wishing to build simple test programs can access an implementation of these methods most easily using the CCNReader and CCNWriter class. Clients wishing to do more sophisticated IO should look at the options available in the org.ccnx.ccn.io and org.ccnx.ccn.io.content packages.

See also:
CCNHandle

Member Function Documentation

void org.ccnx.ccn.CCNBase.cancelInterest ( Interest  interest,
CCNInterestListener  listener 
)

Cancel this interest.

Parameters:
interest 
listener Used to distinguish the same interest requested by more than one listener.

Implemented in org.ccnx.ccn.CCNHandle, and org.ccnx.ccn.test.profiles.versioning.VersioningHelper.SinkHandle.

void org.ccnx.ccn.CCNBase.expressInterest ( Interest  interest,
CCNInterestListener  listener 
) throws IOException

Query, or express an interest in particular content.

This request is sent out over the CCN to other nodes. On any results, the callbackListener if given, is notified. Results may also be cached in a local repository for later retrieval by get(). Get and expressInterest could be implemented as a single function that might return some content immediately and others by callback; we separate the two for now to simplify the interface.

Pass it on to the CCNInterestManager to forward to the network. Also express it to the repositories we manage, particularly the primary. Each might generate their own CCNQueryDescriptor, so we need to group them together.

Implemented in org.ccnx.ccn.CCNHandle, and org.ccnx.ccn.test.profiles.versioning.VersioningHelper.SinkHandle.

ContentObject org.ccnx.ccn.CCNBase.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 

Implemented in org.ccnx.ccn.CCNHandle, and org.ccnx.ccn.test.CCNLibraryTestHarness.

ContentObject org.ccnx.ccn.CCNBase.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 

Implemented in org.ccnx.ccn.CCNHandle, and org.ccnx.ccn.test.CCNLibraryTestHarness.

void org.ccnx.ccn.CCNBase.registerFilter ( ContentName  filter,
CCNFilterListener  callbackListener 
) throws IOException

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

Parameters:
filter 
callbackListener 
Exceptions:
IOException 

Implemented in org.ccnx.ccn.CCNHandle, and org.ccnx.ccn.test.CCNLibraryTestHarness.

void org.ccnx.ccn.CCNBase.unregisterFilter ( ContentName  filter,
CCNFilterListener  callbackListener 
)

Unregister a standing interest filter.

Parameters:
filter 
callbackListener 

Implemented in org.ccnx.ccn.CCNHandle, and org.ccnx.ccn.test.CCNLibraryTestHarness.


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