Track interests. More...
Public Member Functions | |
synchronized void | expressInterest (Interest interest, CCNInterestListener listener) throws IOException |
Query, or express an interest in particular content. | |
synchronized void | cancelInterest (Interest interest, CCNInterestListener listener) |
Cancel this interest. | |
Static Public Member Functions | |
static SinkHandle | open (KeyManager keyManager) throws IOException |
Create a new CCNHandle, opening a new connection to the CCN network, and specifying the KeyManager it should use. | |
static SinkHandle | open (CCNHandle handle) throws IOException |
Public Attributes | |
final ArrayList< Interest > | interests = new ArrayList<Interest>() |
final ConditionLong | count = new ConditionLong(0) |
final ConditionLong | total_count = new ConditionLong(0) |
Protected Member Functions | |
SinkHandle (KeyManager keyManager) throws IOException |
Track interests.
synchronized void org.ccnx.ccn.test.profiles.versioning.VersioningHelper.SinkHandle.cancelInterest | ( | Interest | interest, | |
CCNInterestListener | listener | |||
) |
Cancel this interest.
interest | ||
listener | Used to distinguish the same interest requested by more than one listener. |
Reimplemented from org.ccnx.ccn.CCNHandle.
synchronized void org.ccnx.ccn.test.profiles.versioning.VersioningHelper.SinkHandle.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.
interest | ||
listener |
Reimplemented from org.ccnx.ccn.CCNHandle.
static SinkHandle org.ccnx.ccn.test.profiles.versioning.VersioningHelper.SinkHandle.open | ( | KeyManager | keyManager | ) | throws IOException [static] |
Create a new CCNHandle, opening a new connection to the CCN network, and specifying the KeyManager it should use.
Particularly useful in testing, to run as if you were a different "user", with a different collection of keys.
keyManager | the KeyManager to use |
IOException |
Reimplemented from org.ccnx.ccn.CCNHandle.