jadex.standalone.transport.codecs
Class NuggetsCodec

java.lang.Object
  extended by jadex.standalone.transport.codecs.NuggetsCodec
All Implemented Interfaces:
IDecoder, IEncoder

public class NuggetsCodec
extends Object
implements IEncoder, IDecoder

The Nuggets XML codec. Codec supports parallel calls of multiple concurrent clients (no method synchronization necessary).


Field Summary
static byte CODEC_ID
          The nuggets codec id.
protected static Method ofx
          ObjectFromXML method.
protected static Method otx
          ObjectToXML method.
 
Constructor Summary
NuggetsCodec()
           
 
Method Summary
 Object decode(byte[] bytes, ClassLoader classloader)
          Decode an object.
 byte[] encode(Object val, ClassLoader classloader)
          Encode an object.
static void init(ClassLoader classloader)
          Init the static methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CODEC_ID

public static final byte CODEC_ID
The nuggets codec id.

See Also:
Constant Field Values

otx

protected static Method otx
ObjectToXML method.


ofx

protected static Method ofx
ObjectFromXML method.

Constructor Detail

NuggetsCodec

public NuggetsCodec()
Method Detail

init

public static void init(ClassLoader classloader)
Init the static methods.


encode

public byte[] encode(Object val,
                     ClassLoader classloader)
Encode an object.

Specified by:
encode in interface IEncoder
Parameters:
obj - The object.
Returns:
The encoded object.
Throws:
IOException

decode

public Object decode(byte[] bytes,
                     ClassLoader classloader)
Decode an object.

Specified by:
decode in interface IDecoder
Parameters:
bytes - The value bytes.
Returns:
The decoded object.
Throws:
IOException


Copyright © 2010. All Rights Reserved.