org.ccnx.ccn.impl.encoding.XMLCodecFactory Class Reference

Factory class that given a string codec name, returns the XMLEncoder and XMLDecoder that handle that codec. More...

List of all members.

Static Public Member Functions

static void registerEncoder (String name, Class<?extends XMLEncoder > encoderClass)
static void registerDecoder (String name, Class<?extends XMLDecoder > decoderClass)
static void setDefaultCodec (String name)
static String getDefaultCodecName ()
 If default codec has been set for this runtime using setDefaultCodec, use that value.
static XMLEncoder getEncoder ()
 Get instance of default encoder.
static XMLEncoder getEncoder (String codecName)
 Get an instance of the specified encoder.
static XMLDecoder getDecoder ()
 Get instance of default decoder.
static XMLDecoder getDecoder (String codecName)
 Get instance of specified decoder.
static Class<?extends XMLEncodergetEncoderClass (String codecName)
static Class<?extends XMLDecodergetDecoderClass (String codecName)
static Class<?extends XMLEncodergetDefaultEncoderClass ()
static Class<?extends XMLDecodergetDefaultDecoderClass ()

Static Protected Attributes

static String _defaultCodec = null
static HashMap< String, Class
<?extends XMLEncoder > > 
_registeredEncoders
static HashMap< String, Class
<?extends XMLDecoder > > 
_registeredDecoders

Static Package Functions

 [static initializer]


Detailed Description

Factory class that given a string codec name, returns the XMLEncoder and XMLDecoder that handle that codec.

Allows new codecs to be registered on the fly for extensibility.


Member Function Documentation

static String org.ccnx.ccn.impl.encoding.XMLCodecFactory.getDefaultCodecName (  )  [static]

If default codec has been set for this runtime using setDefaultCodec, use that value.

If not, go to SystemConfiguration to get either the command-line value if present or the compiled-in default.

Returns:

static XMLEncoder org.ccnx.ccn.impl.encoding.XMLCodecFactory.getEncoder (  )  [static]

Get instance of default encoder.

Returns:

static XMLEncoder org.ccnx.ccn.impl.encoding.XMLCodecFactory.getEncoder ( String  codecName  )  [static]

Get an instance of the specified encoder.

Parameters:
codecName 
Returns:

static XMLDecoder org.ccnx.ccn.impl.encoding.XMLCodecFactory.getDecoder ( String  codecName  )  [static]

Get instance of specified decoder.

Parameters:
codecName 
Returns:


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

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