org.ccnx.ccn.protocol.KeyName Class Reference

We wish to securely refer to a key. More...

Inheritance diagram for org.ccnx.ccn.protocol.KeyName:

org.ccnx.ccn.impl.encoding.GenericXMLEncodable org.ccnx.ccn.impl.encoding.XMLEncodable org.ccnx.ccn.impl.encoding.XMLEncodable

List of all members.

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


Detailed Description

We wish to securely refer to a key.

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.


Constructor & Destructor Documentation

org.ccnx.ccn.protocol.KeyName.KeyName ( ContentName  name,
PublisherID  publisher 
)

Build a KeyName.

Parameters:
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  ) 

Build a KeyName.

Parameters:
name the name at which we can find the key


Member Function Documentation

ContentName org.ccnx.ccn.protocol.KeyName.name (  ) 

Get the name.

Returns:
the name

PublisherID org.ccnx.ccn.protocol.KeyName.publisher (  ) 

Get the required publisher information, if specified.

Returns:
the publisher specification

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.

Parameters:
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.

Returns:
the element label to use, as a key in a loaded encoding dictionary

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.

Returns:
true if object is valid and can be encoded, false if there is a problem; for example mandatory fields are uninitialized

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.


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

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