org.ccnx.ccn.impl.repo.RepositoryDataListener Class Reference

Handles incoming data for the repository. More...

Inheritance diagram for org.ccnx.ccn.impl.repo.RepositoryDataListener:

org.ccnx.ccn.CCNContentHandler

List of all members.

Public Member Functions

 RepositoryDataListener (Interest origInterest, Interest interest, RepositoryServer server)
Interest handleContent (ContentObject co, Interest interest)
 The actual incoming data handler.
void handleData (ContentObject co)
 Allow subclasses to override data handling behavior.
void cancelInterests ()
 Called on listener teardown.
long getTimer ()
 Gets the time of the last data received.
void setTimer (long time)
 Changes the time used to timeout the listener.
Interest getOrigInterest ()
 Gets the namespace served by this listener as an interest.
InterestTable< Object > getInterests ()
 Gets the current set of outstanding interests for this listener.

Protected Attributes

RepositoryServer _server

Classes

class  CancelInterestsAction
 Cancel all interests for segments higher than "value".
class  GetLargestSegmentNumberAction
 Since the interest table doesn't have a defined order for values with the same length we must explicitly go through all the values to decide whether we want to take some action based on the "value" (i.e.
class  InterestActionClass
 Perform the specified action for all values in the interest table.


Detailed Description

Handles incoming data for the repository.

Its jobs are to store data in the repository by interfacing with the RepositoryStore and to generate interests for data following the received data in an input stream. RepositoryDataListeners are destroyed after the stream which triggered their creation has been fully read.


Constructor & Destructor Documentation

org.ccnx.ccn.impl.repo.RepositoryDataListener.RepositoryDataListener ( Interest  origInterest,
Interest  interest,
RepositoryServer  server 
)

Parameters:
origInterest interest to be used to identify this listener to filter out subsequent duplicate or overlapping requests
interest used only to log the actual interest that created this listener
server associated RepositoryServer


Member Function Documentation

Interest org.ccnx.ccn.impl.repo.RepositoryDataListener.handleContent ( ContentObject  co,
Interest  interest 
)

The actual incoming data handler.

Kicks off a thread to store the data and expresses interest in data following the incoming data.

Implements org.ccnx.ccn.CCNContentHandler.

void org.ccnx.ccn.impl.repo.RepositoryDataListener.handleData ( ContentObject  co  ) 

Allow subclasses to override data handling behavior.

Parameters:
co 

long org.ccnx.ccn.impl.repo.RepositoryDataListener.getTimer (  ) 

Gets the time of the last data received.

Returns:

void org.ccnx.ccn.impl.repo.RepositoryDataListener.setTimer ( long  time  ) 

Changes the time used to timeout the listener.

Parameters:
time 

Interest org.ccnx.ccn.impl.repo.RepositoryDataListener.getOrigInterest (  ) 

Gets the namespace served by this listener as an interest.

Returns:

InterestTable<Object> org.ccnx.ccn.impl.repo.RepositoryDataListener.getInterests (  ) 

Gets the current set of outstanding interests for this listener.

Returns:


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

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