Class JSerializer

  • All Implemented Interfaces:
    Serializer
    Direct Known Subclasses:
    AbstractSerializationSupport

    public abstract class JSerializer
    extends java.lang.Object
    implements Serializer
    Java API for creating a Serializer: make sure to include a constructor which takes exactly one argument of type ExtendedActorSystem, because that is the preferred constructor which will be invoked when reflectively instantiating the JSerializer (also possible with empty constructor).
    • Constructor Summary

      Constructors 
      Constructor Description
      JSerializer()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object fromBinary​(byte[] bytes, scala.Option<java.lang.Class<?>> manifest)
      Produces an object from an array of bytes, with an optional type-hint; the class should be loaded using ActorSystem.dynamicAccess.
      protected abstract java.lang.Object fromBinaryJava​(byte[] bytes, java.lang.Class<?> manifest)
      This method must be implemented, manifest may be null.
      • Methods inherited from class java.lang.Object

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

      • JSerializer

        public JSerializer()
    • Method Detail

      • fromBinary

        public final java.lang.Object fromBinary​(byte[] bytes,
                                                 scala.Option<java.lang.Class<?>> manifest)
                                          throws java.io.NotSerializableException
        Description copied from interface: Serializer
        Produces an object from an array of bytes, with an optional type-hint; the class should be loaded using ActorSystem.dynamicAccess.
        Specified by:
        fromBinary in interface Serializer
        Throws:
        java.io.NotSerializableException
      • fromBinaryJava

        protected abstract java.lang.Object fromBinaryJava​(byte[] bytes,
                                                           java.lang.Class<?> manifest)
        This method must be implemented, manifest may be null.