Package org.apache.pekko.serialization
Class JSerializer
java.lang.Object
org.apache.pekko.serialization.JSerializer
- All Implemented Interfaces:
Serializer
- Direct Known Subclasses:
AbstractSerializationSupport
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ObjectfromBinary(byte[] bytes, scala.Option<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 ObjectfromBinaryJava(byte[] bytes, 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, waitMethods inherited from interface org.apache.pekko.serialization.Serializer
fromBinary, fromBinary, identifier, includeManifest, toBinary
-
Constructor Details
-
JSerializer
public JSerializer()
-
-
Method Details
-
fromBinary
public final Object fromBinary(byte[] bytes, scala.Option<Class<?>> manifest) throws NotSerializableException Description copied from interface:SerializerProduces an object from an array of bytes, with an optional type-hint; the class should be loaded using ActorSystem.dynamicAccess.- Specified by:
fromBinaryin interfaceSerializer- Throws:
NotSerializableException
-
fromBinaryJava
This method must be implemented, manifest may be null.
-