org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse Class Reference

NameEnumerationResponse objects are used to respond to incoming NameEnumeration interests. More...

List of all members.

Public Member Functions

 NameEnumerationResponse ()
 Empty NameEnumerationResponse constructor that sets the variables to null.
 NameEnumerationResponse (ContentName p, ArrayList< ContentName > n, CCNTime ts)
 NameEnumerationResponse constructor that populates the object's variables.
 NameEnumerationResponse (ContentName p, byte[][] names, CCNTime ts)
 Builds a NE response from name components -- NE responses contain ContentNames that only have a single component.
void setPrefix (ContentName p)
 Method to set the NameEnumerationReponse prefix.
void setNameList (ArrayList< ContentName > n)
 Method to set the names to return under the prefix.
void add (ContentName name)
 Add a name to the list.
void add (byte[] name)
 Add a single-component name to the list.
void add (String name)
 Add a single-component name to the list.
ContentName getPrefix ()
 Method to get the prefix for the response.
ArrayList< ContentNamegetNames ()
 Method to get the names for the response.
void setTimestamp (CCNTime ts)
 Method to set the timestamp for the response version.
CCNTime getTimestamp ()
 Method to get the timestamp for the response object.
NameEnumerationResponseMessage getNamesForResponse ()
 Method to return a Collection object for the names in the response.
boolean hasNames ()
 Method to check if the NameEnumerationResponse object has names to return.

Classes

class  NameEnumerationResponseMessage
 Inner class to slightly modify the collection type used to respond to NE requests. More...


Detailed Description

NameEnumerationResponse objects are used to respond to incoming NameEnumeration interests.

NameEnumerationResponses are generated in two ways, in direct response to an interest where there is new information to return, and where a previous interest was not satisfied (set the interest flag), but a later save occurs directly under the namespace.


Constructor & Destructor Documentation

org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse.NameEnumerationResponse ( ContentName  p,
ArrayList< ContentName n,
CCNTime  ts 
)

NameEnumerationResponse constructor that populates the object's variables.

Parameters:
p ContentName that is the prefix for this response
n ArrayList<ContentName> of the names under the prefix
ts CCNTime is the timestamp used to create the version component for the object when it is written out

org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse.NameEnumerationResponse ( ContentName  p,
bytenames  [][],
CCNTime  ts 
)

Builds a NE response from name components -- NE responses contain ContentNames that only have a single component.

Make a friendlier constructor that doesn't require pre-making names from the components we really want to list.


Member Function Documentation

void org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse.setPrefix ( ContentName  p  ) 

Method to set the NameEnumerationReponse prefix.

Right now forces caller to add the command prefix (e.g. CommandMarkers.COMMAND_MARKER_BASIC_ENUMERATION), should make this cleverer (even if there are multiple NE protocols).

Parameters:
p ContentName of the prefix for the response
Returns:
void

void org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse.setNameList ( ArrayList< ContentName n  ) 

Method to set the names to return under the prefix.

Parameters:
n ArrayList<ContentName> of the children for the response
Returns:
void

ContentName org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse.getPrefix (  ) 

Method to get the prefix for the response.

Returns:
ContentName prefix for the response

ArrayList<ContentName> org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse.getNames (  ) 

Method to get the names for the response.

Returns:
ArrayList<ContentName> Names to return in the response

void org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse.setTimestamp ( CCNTime  ts  ) 

Method to set the timestamp for the response version.

Parameters:
ts CCNTime for the ContentObject version
Returns:
void

CCNTime org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse.getTimestamp (  ) 

Method to get the timestamp for the response object.

Returns:
CCNTime for the version component of the object

NameEnumerationResponseMessage org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse.getNamesForResponse (  ) 

Method to return a Collection object for the names in the response.

Returns:
Collection A collection of the names (as Link objects) to return.

boolean org.ccnx.ccn.profiles.nameenum.NameEnumerationResponse.hasNames (  ) 

Method to check if the NameEnumerationResponse object has names to return.

Returns:
boolean True if there are names to return, false if there are no names or the list of names is null


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

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