Public Member Functions | |
Interest (ContentName name, PublisherID publisher) | |
TODO: DKS figure out how to handle encoding faster, and how to handle shorter version of names without copying, particularly without 1.6 array ops. | |
Interest (ContentName name, PublisherPublicKeyDigest publisher) | |
Interest (ContentName name) | |
Creates Interest with null publisher ID. | |
Interest (String name) throws MalformedContentNameStringException | |
ContentName | name () |
void | name (ContentName name) |
Integer | maxSuffixComponents () |
void | maxSuffixComponents (Integer maxSuffixComponents) |
Integer | minSuffixComponents () |
void | minSuffixComponents (Integer minSuffixComponents) |
PublisherID | publisherID () |
void | publisherID (PublisherID publisherID) |
Exclude | exclude () |
void | exclude (Exclude exclude) |
Integer | childSelector () |
void | childSelector (int childSelector) |
byte[] | interestLifetime () |
void | interestLifetime (byte[] interestLifetime) |
Integer | answerOriginKind () |
void | answerOriginKind (int answerOriginKind) |
Integer | scope () |
void | scope (int scope) |
byte[] | nonce () |
XXX - This isn't user settable and is only useful for ccnd internal functionality. | |
boolean | matches (ContentObject test) |
Determine whether a piece of content matches the Interest. | |
boolean | matches (ContentName name, PublisherPublicKeyDigest resultPublisherKeyID) |
Determine whether a piece of content's name *without* digest component matches this Interest. | |
boolean | matches (ContentObject co, PublisherPublicKeyDigest resultPublisherKeyID) |
Determine whether a piece of content matches this Interest. | |
boolean | isPrefixOf (ContentName name) |
Determine if this Interest's name is a prefix of the specified name. | |
boolean | isPrefixOf (ContentName name, int count) |
Determine if this Interest's name is a prefix of the first "count" components of the input name. | |
boolean | isPrefixOf (ContentObject other) |
Determine if this Interest's name is a prefix of the specified ContentObject's name. | |
void | decode (XMLDecoder decoder) throws ContentDecodingException |
Thought about encoding and decoding as flat -- no wrapping declaration. | |
void | encode (XMLEncoder encoder) throws ContentEncodingException |
Encode this object during an ongoing encoding pass; this is what subclasses generally need to know how to implement. | |
long | getElementLabel () |
Allow the encoder/decoder to retrieve the top-level element name programmatically. | |
boolean | validate () |
Make sure all of the necessary fields are filled in prior to attempting to encode. | |
int | compareTo (Interest o) |
int | hashCode () |
boolean | equals (Object obj) |
String | toString () |
Default toString() implementation simply prints the text encoding of the object. | |
Interest | clone () |
Static Public Member Functions | |
static Interest | lower (ContentName name, int level, PublisherPublicKeyDigest publisher) |
Return data a specified number of levels below us in the hierarchy, with order preference of leftmost. | |
static Interest | next (ContentName name, Integer prefixCount, PublisherPublicKeyDigest publisher) |
Construct an Interest that will give you the next content after the argument name's first prefixCount components. | |
static Interest | next (ContentName name, Exclude exclude, Integer prefixCount, Integer maxSuffixComponents, Integer minSuffixComponents, PublisherPublicKeyDigest publisher) |
Construct an Interest that will give you the next content after the argument names's first prefixCount components excluding the components specified in the omissions. | |
static Interest | last (ContentName name, Integer prefixCount, PublisherPublicKeyDigest publisher) |
Construct an Interest that will give you the last content after the argument name's first prefixCount components. | |
static Interest | last (ContentName name, Exclude exclude, Integer prefixCount, Integer maxSuffixComponents, Integer minSuffixComponents, PublisherPublicKeyDigest publisher) |
Construct an Interest that will give you the last content after the argument name excluding the components specified in the Exclude. | |
static Interest | exclude (ContentName name, Exclude exclude, Integer maxSuffixComponents, Integer minSuffixComponents, PublisherPublicKeyDigest publisherID) |
Construct an Interest that will exclude the values in omissions and require maxSuffixComponents and minSuffixComponents as specific. | |
static Interest | constructInterest (ContentName name, Exclude filter, Integer childSelector, Integer maxSuffixComponents, Integer minSuffixComponents, PublisherPublicKeyDigest publisher) |
Construct an Interest with specified values set. | |
static byte[] | generateNonce () |
Currently used as an Interest name component to disambiguate multiple requests for the same content. | |
Public Attributes | |
long | userTime |
Static Public Attributes | |
static final String | RECURSIVE_POSTFIX = "*" |
static final int | CHILD_SELECTOR_LEFT = 0 |
static final int | CHILD_SELECTOR_RIGHT = 1 |
static final int | ANSWER_CONTENT_STORE = 1 |
AnswerOriginKind values These are bitmapped. | |
static final int | ANSWER_GENERATED = 2 |
static final int | ANSWER_STALE = 4 |
static final int | MARK_STALE = 16 |
static final int | DEFAULT_ANSWER_ORIGIN_KIND = ANSWER_CONTENT_STORE | ANSWER_GENERATED |
Protected Attributes | |
ContentName | _name |
Integer | _maxSuffixComponents |
Integer | _minSuffixComponents |
PublisherID | _publisher |
Exclude | _exclude |
Integer | _childSelector |
Integer | _answerOriginKind = null |
Integer | _scope |
byte[] | _interestLifetime = null |
byte[] | _nonce |
Static Protected Attributes | |
static Random | _random = new Random() |
For nonce generation. | |
Classes | |
class | NoResponseException |
cf. ContentObject
Implements Comparable to make it easy to store in a Set and avoid duplicates.
org.ccnx.ccn.protocol.Interest.Interest | ( | ContentName | name, | |
PublisherID | publisher | |||
) |
TODO: DKS figure out how to handle encoding faster, and how to handle shorter version of names without copying, particularly without 1.6 array ops.
name | ContentName of Interest | |
publisher | PublisherID of Interest or null |
org.ccnx.ccn.protocol.Interest.Interest | ( | ContentName | name, | |
PublisherPublicKeyDigest | publisher | |||
) |
name | ContentName of Interest | |
publisher | PublisherPublicKeyDigest or null |
org.ccnx.ccn.protocol.Interest.Interest | ( | ContentName | name | ) |
byte [] org.ccnx.ccn.protocol.Interest.nonce | ( | ) |
XXX - This isn't user settable and is only useful for ccnd internal functionality.
Do we ever need to return it?
boolean org.ccnx.ccn.protocol.Interest.matches | ( | ContentObject | test | ) |
boolean org.ccnx.ccn.protocol.Interest.matches | ( | ContentName | name, | |
PublisherPublicKeyDigest | resultPublisherKeyID | |||
) |
Determine whether a piece of content's name *without* digest component matches this Interest.
This doesn't match if the digest is specified in the Interest.
name | - Name of a content object missing it's implied digest component | |
resultPublisherKeyID |
boolean org.ccnx.ccn.protocol.Interest.matches | ( | ContentObject | co, | |
PublisherPublicKeyDigest | resultPublisherKeyID | |||
) |
Determine whether a piece of content matches this Interest.
Note: this computes the digest for the ContentObject, to know the full name. This is computationally expensive.
co | - ContentObject | |
resultPublisherKeyID |
static Interest org.ccnx.ccn.protocol.Interest.lower | ( | ContentName | name, | |
int | level, | |||
PublisherPublicKeyDigest | publisher | |||
) | [static] |
Return data a specified number of levels below us in the hierarchy, with order preference of leftmost.
name | name prefix for interest | |
level | number of levels below us we want content. Includes the ephemeral digest component in the count. | |
publisher | who should have signed content (can be null) |
static Interest org.ccnx.ccn.protocol.Interest.next | ( | ContentName | name, | |
Integer | prefixCount, | |||
PublisherPublicKeyDigest | publisher | |||
) | [static] |
static Interest org.ccnx.ccn.protocol.Interest.next | ( | ContentName | name, | |
Exclude | exclude, | |||
Integer | prefixCount, | |||
Integer | maxSuffixComponents, | |||
Integer | minSuffixComponents, | |||
PublisherPublicKeyDigest | publisher | |||
) | [static] |
Construct an Interest that will give you the next content after the argument names's first prefixCount components excluding the components specified in the omissions.
name | ||
omissions | components to exclude - may be null | |
prefixCount | may be null | |
publisher | may be null |
static Interest org.ccnx.ccn.protocol.Interest.last | ( | ContentName | name, | |
Integer | prefixCount, | |||
PublisherPublicKeyDigest | publisher | |||
) | [static] |
static Interest org.ccnx.ccn.protocol.Interest.last | ( | ContentName | name, | |
Exclude | exclude, | |||
Integer | prefixCount, | |||
Integer | maxSuffixComponents, | |||
Integer | minSuffixComponents, | |||
PublisherPublicKeyDigest | publisher | |||
) | [static] |
static Interest org.ccnx.ccn.protocol.Interest.exclude | ( | ContentName | name, | |
Exclude | exclude, | |||
Integer | maxSuffixComponents, | |||
Integer | minSuffixComponents, | |||
PublisherPublicKeyDigest | publisherID | |||
) | [static] |
static Interest org.ccnx.ccn.protocol.Interest.constructInterest | ( | ContentName | name, | |
Exclude | filter, | |||
Integer | childSelector, | |||
Integer | maxSuffixComponents, | |||
Integer | minSuffixComponents, | |||
PublisherPublicKeyDigest | publisher | |||
) | [static] |
static byte [] org.ccnx.ccn.protocol.Interest.generateNonce | ( | ) | [static] |
Currently used as an Interest name component to disambiguate multiple requests for the same content.
boolean org.ccnx.ccn.protocol.Interest.isPrefixOf | ( | ContentName | name | ) |
Determine if this Interest's name is a prefix of the specified name.
name |
boolean org.ccnx.ccn.protocol.Interest.isPrefixOf | ( | ContentName | name, | |
int | count | |||
) |
Determine if this Interest's name is a prefix of the first "count" components of the input name.
name | ||
count |
boolean org.ccnx.ccn.protocol.Interest.isPrefixOf | ( | ContentObject | other | ) |
Determine if this Interest's name is a prefix of the specified ContentObject's name.
other |
void org.ccnx.ccn.protocol.Interest.decode | ( | XMLDecoder | decoder | ) | throws ContentDecodingException [virtual] |
Thought about encoding and decoding as flat -- no wrapping declaration.
But then couldn't use these solo.
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
void org.ccnx.ccn.protocol.Interest.encode | ( | XMLEncoder | encoder | ) | throws ContentEncodingException [virtual] |
Encode this object during an ongoing encoding pass; this is what subclasses generally need to know how to implement.
Writes just the object itself, higher-level processes have handled start and end document if need be. Allows object to be written using the same code whether it is a top-level element written alone, or nested inside another element.
encoder | the encoder being used; encapsulates state including the codec being used as well as the output destination and current offset |
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
long org.ccnx.ccn.protocol.Interest.getElementLabel | ( | ) | [virtual] |
Allow the encoder/decoder to retrieve the top-level element name programmatically.
This allows subclasses to rename elements without changing their encoder/decoders.
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
boolean org.ccnx.ccn.protocol.Interest.validate | ( | ) | [virtual] |
Make sure all of the necessary fields are filled in prior to attempting to encode.
All implementations of encode(XMLEncoder) should call this for their classes prior to encoding.
Implements org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
String org.ccnx.ccn.protocol.Interest.toString | ( | ) |
Default toString() implementation simply prints the text encoding of the object.
This demonstrates how to force use of the text encoding.
Reimplemented from org.ccnx.ccn.impl.encoding.GenericXMLEncodable.
final int org.ccnx.ccn.protocol.Interest.ANSWER_CONTENT_STORE = 1 [static] |
AnswerOriginKind values These are bitmapped.
Default is 3. 2 is not allowed