Package jadex.serialization
Interface ISerializer
- All Known Implementing Classes:
JadexBasicTypeSerializer
,JadexBinarySerializer
,JadexJsonSerializer
public interface ISerializer
Encode and decode an object from a byte representation.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondecode
(InputStream is, ClassLoader classloader, jadex.common.transformation.traverser.ITraverseProcessor[] postprocs, jadex.common.transformation.traverser.IErrorReporter rep, Object usercontext) Decode an object.void
encode
(OutputStream os, Object val, ClassLoader classloader, jadex.common.transformation.traverser.ITraverseProcessor[] preprocs, Object usercontext) Encode data with the serializer.int
Get the serializer id.
-
Field Details
-
SERIALIZER_ID
Constant for accessing the serializer id.- See Also:
-
-
Method Details
-
getSerializerId
int getSerializerId()Get the serializer id.- Returns:
- The serializer id.
-
encode
void encode(OutputStream os, Object val, ClassLoader classloader, jadex.common.transformation.traverser.ITraverseProcessor[] preprocs, Object usercontext) Encode data with the serializer.- Parameters:
os
- The output stream for writing.val
- The value.classloader
- The classloader.preproc
- The encoding preprocessors.
-
decode
Object decode(InputStream is, ClassLoader classloader, jadex.common.transformation.traverser.ITraverseProcessor[] postprocs, jadex.common.transformation.traverser.IErrorReporter rep, Object usercontext) Decode an object.- Returns:
- The decoded object.
- Throws:
IOException
-