Class JSerializer

java.lang.Object
org.apache.pekko.serialization.JSerializer
All Implemented Interfaces:
Serializer
Direct Known Subclasses:
AbstractSerializationSupport

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

    • JSerializer

      public JSerializer()
  • Method Details

    • fromBinary

      public final Object fromBinary(byte[] bytes, scala.Option<Class<?>> manifest) throws 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:
      NotSerializableException
    • fromBinaryJava

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