org.ccnx.ccn.io.content.CCNEncodableObject< E extends XMLEncodable > Class Reference

Provides persistence for classes implementing XMLEncodable using a CCN network to store/load the data. More...

Inheritance diagram for org.ccnx.ccn.io.content.CCNEncodableObject< E extends XMLEncodable >:

org.ccnx.ccn.io.content.CCNNetworkObject< E > org.ccnx.ccn.io.content.NetworkObject< E > org.ccnx.ccn.CCNContentHandler

List of all members.

Public Member Functions

 CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, E data, SaveType saveType, CCNHandle handle) throws IOException
 CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, E data, SaveType saveType, PublisherPublicKeyDigest publisher, KeyLocator keyLocator, CCNHandle handle) throws IOException
 CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, CCNHandle handle) throws ContentDecodingException, IOException
 CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, PublisherPublicKeyDigest publisher, CCNHandle handle) throws ContentDecodingException, IOException
 CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentObject firstBlock, CCNHandle handle) throws ContentDecodingException, IOException

Protected Member Functions

 CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, E data, PublisherPublicKeyDigest publisher, KeyLocator keyLocator, CCNFlowControl flowControl) throws IOException
 CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentName name, PublisherPublicKeyDigest publisher, CCNFlowControl flowControl) throws ContentDecodingException, IOException
 CCNEncodableObject (Class< E > type, boolean contentIsMutable, ContentObject firstBlock, CCNFlowControl flowControl) throws ContentDecodingException, IOException
 CCNEncodableObject (Class< E > type, CCNEncodableObject<?extends E > other)
readObjectImpl (InputStream input) throws ContentDecodingException, IOException
 Subclasses override.
void writeObjectImpl (OutputStream output) throws ContentEncodingException, IOException
 Subclasses override.


Detailed Description

Provides persistence for classes implementing XMLEncodable using a CCN network to store/load the data.

This is similar to the Data Access Object pattern.

The data supplier (class implementing XMLEncodable's encode() and decode() methods) is called to read and write those objects to CCN.


Member Function Documentation

E org.ccnx.ccn.io.content.CCNEncodableObject< E extends XMLEncodable >.readObjectImpl ( InputStream  input  )  throws ContentDecodingException, IOException [protected, virtual]

Subclasses override.

This implements the actual object read from stream, returning the new object.

Exceptions:
ContentDecodingException if there is an error decoding the object
IOException if there is an error actually reading the data

Implements org.ccnx.ccn.io.content.NetworkObject< E >.

void org.ccnx.ccn.io.content.CCNEncodableObject< E extends XMLEncodable >.writeObjectImpl ( OutputStream  output  )  throws ContentEncodingException, IOException [protected, virtual]

Subclasses override.

This implements the actual object write. No flush or close necessary.

Parameters:
output the stream to write to
Exceptions:
ContentEncodingException if there is an error encoding the object
IOException if there is an error writing it to the network

Implements org.ccnx.ccn.io.content.NetworkObject< E >.


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

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