Class JadexFramedBinarySerializer

  • All Implemented Interfaces:
    ISerializer

    public class JadexFramedBinarySerializer
    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 Summary

      Fields 
      Modifier and Type Field Description
      protected boolean DEBUG
      The debug flag.
      static int SERIALIZER_ID
      The JadexBinary serializer id.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object decode​(byte[] bytes, java.lang.ClassLoader classloader, ITraverseProcessor[] postprocs, IErrorReporter rep, java.lang.Object usercontext)
      Decode an object.
      java.lang.Object decode​(java.io.InputStream is, java.lang.ClassLoader classloader, ITraverseProcessor[] postprocs, IErrorReporter rep)
      Decode an object.
      java.lang.Object decode​(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.
      int getSerializerId()
      Get the serializer id.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • SERIALIZER_ID

        public static final int SERIALIZER_ID
        The JadexBinary serializer id.
        See Also:
        Constant Field Values
      • DEBUG

        protected boolean DEBUG
        The debug flag.
    • Constructor Detail

      • JadexFramedBinarySerializer

        public JadexFramedBinarySerializer()
    • Method Detail

      • getSerializerId

        public int getSerializerId()
        Get the serializer id.
        Specified by:
        getSerializerId in interface ISerializer
        Returns:
        The serializer id.
      • encode

        public byte[] encode​(java.lang.Object val,
                             java.lang.ClassLoader classloader,
                             ITraverseProcessor[] preprocs,
                             java.lang.Object usercontext)
        Encode data with the serializer.
        Specified by:
        encode in interface ISerializer
        Parameters:
        val - The value.
        classloader - The classloader.
        preproc - The encoding preprocessors.
        Returns:
        The encoded object.
      • decode

        public java.lang.Object decode​(byte[] bytes,
                                       java.lang.ClassLoader classloader,
                                       ITraverseProcessor[] postprocs,
                                       IErrorReporter rep,
                                       java.lang.Object usercontext)
        Decode an object.
        Specified by:
        decode in interface ISerializer
        Parameters:
        bytes - The value bytes as byte array or input stream.
        Returns:
        The decoded object.
        Throws:
        java.io.IOException
      • decode

        public 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
      • decode

        public 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:
        decode in interface ISerializer
        Returns:
        The decoded object.
        Throws:
        java.io.IOException