Class MessageSerializer

java.lang.Object
org.apache.pekko.remote.MessageSerializer

public class MessageSerializer extends Object
INTERNAL API

MessageSerializer is a helper for serializing and deserialize messages

  • Constructor Details

    • MessageSerializer

      public MessageSerializer()
  • Method Details

    • deserialize

      public static Object deserialize(ExtendedActorSystem system, WireFormats.SerializedMessage messageProtocol)
      Uses Pekko Serialization for the specified ActorSystem to transform the given MessageProtocol to a message
    • serialize

      public static WireFormats.SerializedMessage serialize(ExtendedActorSystem system, Object message)
      Uses Pekko Serialization for the specified ActorSystem to transform the given message to a MessageProtocol Throws NotSerializableException if serializer was not configured for the message type. Throws MessageSerializer.SerializationException if exception was thrown from toBinary of the serializer.
    • serializeForArtery

      public static void serializeForArtery(Serialization serialization, OutboundEnvelope outboundEnvelope, HeaderBuilder headerBuilder, org.apache.pekko.remote.artery.EnvelopeBuffer envelope)
    • deserializeForArtery

      public static Object deserializeForArtery(ExtendedActorSystem system, long originUid, Serialization serialization, int serializer, String classManifest, org.apache.pekko.remote.artery.EnvelopeBuffer envelope)