Public Member Functions | |
KeyName (ContentName name, PublisherID publisher) | |
Build a KeyName. | |
KeyName (ContentName name, PublisherPublicKeyDigest publisher) | |
KeyName (ContentName name) | |
Build a KeyName. | |
KeyName () | |
For use by decoders. | |
ContentName | name () |
Get the name. | |
PublisherID | publisher () |
Get the required publisher information, if specified. | |
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 | hashCode () |
boolean | equals (Object obj) |
String | toString () |
Default toString() implementation simply prints the text encoding of the object. | |
Protected Attributes | |
ContentName | _name |
PublisherID | _publisher |
We do that by specifying a ContentName where it can be retrieved, and (optionally) information about who must have signed it for us to consider it valid. This can be a direct specification of who must have signed it -- effectively saying that a specific key, corresponding to an individual, most have signed the target for us to find it acceptable. More powerfully, this can incorporate a level of indirection -- we can say that an acceptable key is one signed by anyone whose own key was signed by the specified publisher, effectively allowing for a form of certification.
For now we allow a variety of specification of publisher, including some using digital certificates. These may be unnecessary and elided in the future.
org.ccnx.ccn.protocol.KeyName.KeyName | ( | ContentName | name, | |
PublisherID | publisher | |||
) |
Build a KeyName.
name | the name at which we can find the key | |
publisher | the publisher we require to have signed the key, or to have signed the key that signed the key |
org.ccnx.ccn.protocol.KeyName.KeyName | ( | ContentName | name | ) |
ContentName org.ccnx.ccn.protocol.KeyName.name | ( | ) |
Get the name.
PublisherID org.ccnx.ccn.protocol.KeyName.publisher | ( | ) |
Get the required publisher information, if specified.
void org.ccnx.ccn.protocol.KeyName.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.KeyName.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.KeyName.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.KeyName.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.KeyName.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.