jadex.standalone.transport.codecs
Class SerialCodec

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

public class SerialCodec
extends Object
implements IEncoder, IDecoder

The serial codec allows for encoding and decoding objects via the Java serialization mechanism. Codec supports parallel calls of multiple concurrent clients (no method synchronization necessary).


Field Summary
static byte CODEC_ID
          The serial codec id.
 
Constructor Summary
SerialCodec()
           
 
Method Summary
 Object decode(byte[] bytes, ClassLoader classloader)
          Decode data with the codec.
 byte[] encode(Object object, ClassLoader classloader)
          Encode data with the codec.
 
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 serial codec id.

See Also:
Constant Field Values
Constructor Detail

SerialCodec

public SerialCodec()
Method Detail

encode

public byte[] encode(Object object,
                     ClassLoader classloader)
Encode data with the codec.

Specified by:
encode in interface IEncoder
Parameters:
val - The value.
Returns:
The encoded object.

decode

public Object decode(byte[] bytes,
                     ClassLoader classloader)
Decode data with the codec.

Specified by:
decode in interface IDecoder
Parameters:
val - The string value.
Returns:
The encoded object.


Copyright © 2010. All Rights Reserved.