Package org.apache.pekko.remote
Class MessageSerializer
- java.lang.Object
-
- org.apache.pekko.remote.MessageSerializer
-
public class MessageSerializer extends java.lang.Object
INTERNAL APIMessageSerializer is a helper for serializing and deserialize messages
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MessageSerializer.SerializationException
-
Constructor Summary
Constructors Constructor Description MessageSerializer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Object
deserialize(ExtendedActorSystem system, WireFormats.SerializedMessage messageProtocol)
Uses Pekko Serialization for the specified ActorSystem to transform the given MessageProtocol to a messagestatic java.lang.Object
deserializeForArtery(ExtendedActorSystem system, long originUid, Serialization serialization, int serializer, java.lang.String classManifest, org.apache.pekko.remote.artery.EnvelopeBuffer envelope)
static WireFormats.SerializedMessage
serialize(ExtendedActorSystem system, java.lang.Object message)
Uses Pekko Serialization for the specified ActorSystem to transform the given message to a MessageProtocol ThrowsNotSerializableException
if serializer was not configured for the message type.static void
serializeForArtery(Serialization serialization, OutboundEnvelope outboundEnvelope, HeaderBuilder headerBuilder, org.apache.pekko.remote.artery.EnvelopeBuffer envelope)
-
-
-
Method Detail
-
deserialize
public static java.lang.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, java.lang.Object message)
Uses Pekko Serialization for the specified ActorSystem to transform the given message to a MessageProtocol ThrowsNotSerializableException
if serializer was not configured for the message type. ThrowsMessageSerializer.SerializationException
if exception was thrown fromtoBinary
of the serializer.
-
serializeForArtery
public static void serializeForArtery(Serialization serialization, OutboundEnvelope outboundEnvelope, HeaderBuilder headerBuilder, org.apache.pekko.remote.artery.EnvelopeBuffer envelope)
-
deserializeForArtery
public static java.lang.Object deserializeForArtery(ExtendedActorSystem system, long originUid, Serialization serialization, int serializer, java.lang.String classManifest, org.apache.pekko.remote.artery.EnvelopeBuffer envelope)
-
-