Handles incoming data for the repository. More...
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. | |
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 |
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.
org.ccnx.ccn.impl.repo.RepositoryDataListener.RepositoryDataListener | ( | Interest | origInterest, | |
Interest | interest, | |||
RepositoryServer | server | |||
) |
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 |
InterestTable<Object> org.ccnx.ccn.impl.repo.RepositoryDataListener.getInterests | ( | ) |
Gets the current set of outstanding interests for this listener.
Interest org.ccnx.ccn.impl.repo.RepositoryDataListener.getOrigInterest | ( | ) |
Gets the namespace served by this listener as an interest.
long org.ccnx.ccn.impl.repo.RepositoryDataListener.getTimer | ( | ) |
Gets the time of the last data received.
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.CCNInterestListener.
void org.ccnx.ccn.impl.repo.RepositoryDataListener.handleData | ( | ContentObject | co | ) |
Allow subclasses to override data handling behavior.
co |
void org.ccnx.ccn.impl.repo.RepositoryDataListener.setTimer | ( | long | time | ) |
Changes the time used to timeout the listener.
time |