Class ElsaSerializerBase.Serializer<A>

  • Type Parameters:
    A - type of value handled by this serializer
    Direct Known Subclasses:
    ElsaSerializerBase.UserSerializer
    Enclosing class:
    ElsaSerializerBase

    public abstract static class ElsaSerializerBase.Serializer<A>
    extends java.lang.Object
    Interface internally used by Elsa to serialize concrete single class. Internally Elsa uses Map<Class,Serializer> to decide what serializer to use for each element. User can register their own serializers with ElsaMaker#registerSerializer(int, Class, Serializer)
    • Constructor Summary

      Constructors 
      Constructor Description
      Serializer()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void serialize​(java.io.DataOutput out, A value, ElsaStack objectStack)
      Serialize the content of an object into a ObjectOutput`
      • Methods inherited from class java.lang.Object

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

      • Serializer

        public Serializer()
    • Method Detail

      • serialize

        public abstract void serialize​(java.io.DataOutput out,
                                       A value,
                                       ElsaStack objectStack)
                                throws java.io.IOException
        Serialize the content of an object into a ObjectOutput`
        Parameters:
        out - ObjectOutput to save object into
        value - Object to serialize
        objectStack - object stack used to handle backward references
        Throws:
        java.io.IOException - an exceptio from underlying stream