Class JadexBinarySerializer
- java.lang.Object
- 
- jadex.platform.service.serialization.serializers.JadexBinarySerializer
 
- 
- All Implemented Interfaces:
- ISerializer
 
 public class JadexBinarySerializer extends java.lang.Object implements ISerializer The Jadex Binary serializer. Codec supports parallel calls of multiple concurrent clients (no method synchronization necessary). Converts object -> byte[] and byte[] -> object.
- 
- 
Field SummaryFields Modifier and Type Field Description protected static SerializationConfigCONFIGConfig with pre-defined Strings for faster encoding/decoding.protected booleanDEBUGThe debug flag.java.util.List<IDecoderHandler>readprocsThe read processors.static intSERIALIZER_IDThe JadexBinary serializer id.java.util.List<ITraverseProcessor>writeprocsThe write processors.
 - 
Constructor SummaryConstructors Constructor Description JadexBinarySerializer()Create a new serializer.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddProcessor(IDecoderHandler readproc, ITraverseProcessor writeproc)Add a processor pair.java.lang.Objectdecode(byte[] bytes, java.lang.ClassLoader classloader, ITraverseProcessor[] postprocs, IErrorReporter rep, java.lang.Object usercontext)Decode an object.java.lang.Objectdecode(java.io.InputStream is, java.lang.ClassLoader classloader, ITraverseProcessor[] postprocs, IErrorReporter rep)Decode an object.java.lang.Objectdecode(java.io.InputStream is, java.lang.ClassLoader classloader, ITraverseProcessor[] postprocs, IErrorReporter rep, java.lang.Object usercontext)Decode an object.byte[]encode(java.lang.Object val, java.lang.ClassLoader classloader, ITraverseProcessor[] preprocs, java.lang.Object usercontext)Encode data with the serializer.intgetSerializerId()Get the serializer id.
 
- 
- 
- 
Field Detail- 
SERIALIZER_IDpublic static final int SERIALIZER_ID The JadexBinary serializer id.- See Also:
- Constant Field Values
 
 - 
DEBUGprotected boolean DEBUG The debug flag.
 - 
CONFIGprotected static SerializationConfig CONFIG Config with pre-defined Strings for faster encoding/decoding.
 - 
writeprocspublic java.util.List<ITraverseProcessor> writeprocs The write processors.
 - 
readprocspublic java.util.List<IDecoderHandler> readprocs The read processors.
 
- 
 - 
Method Detail- 
getSerializerIdpublic int getSerializerId() Get the serializer id.- Specified by:
- getSerializerIdin interface- ISerializer
- Returns:
- The serializer id.
 
 - 
encodepublic byte[] encode(java.lang.Object val, java.lang.ClassLoader classloader, ITraverseProcessor[] preprocs, java.lang.Object usercontext)Encode data with the serializer.- Specified by:
- encodein interface- ISerializer
- Parameters:
- val- The value.
- classloader- The classloader.
- preproc- The encoding preprocessors.
- Returns:
- The encoded object.
 
 - 
decodepublic java.lang.Object decode(byte[] bytes, java.lang.ClassLoader classloader, ITraverseProcessor[] postprocs, IErrorReporter rep, java.lang.Object usercontext)Decode an object.- Specified by:
- decodein interface- ISerializer
- Parameters:
- bytes- The value bytes as byte array or input stream.
- Returns:
- The decoded object.
- Throws:
- java.io.IOException
 
 - 
decodepublic java.lang.Object decode(java.io.InputStream is, java.lang.ClassLoader classloader, ITraverseProcessor[] postprocs, IErrorReporter rep)Decode an object.- Returns:
- The decoded object.
- Throws:
- java.io.IOException
 
 - 
decodepublic java.lang.Object decode(java.io.InputStream is, java.lang.ClassLoader classloader, ITraverseProcessor[] postprocs, IErrorReporter rep, java.lang.Object usercontext)Decode an object.- Specified by:
- decodein interface- ISerializer
- Returns:
- The decoded object.
- Throws:
- java.io.IOException
 
 - 
addProcessorpublic void addProcessor(IDecoderHandler readproc, ITraverseProcessor writeproc) Add a processor pair.
 
- 
 
-