Package org.apache.pekko.serialization
Class Serialization$
java.lang.Object
org.apache.pekko.serialization.Serialization$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Serialization$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the serialization information from aThreadLocalthat was assigned viaSerialization.withTransportInformation(org.apache.pekko.actor.ExtendedActorSystem, scala.Function0<T>).serializedActorPath(ActorRef actorRef) The serialized path of an actorRef, based on the current transport serialization information.<T> TwithTransportInformation(ExtendedActorSystem system, scala.Function0<T> f) Sets serialization information in aThreadLocaland runsf.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
Serialization$
public Serialization$()
-
-
Method Details
-
serializedActorPath
The serialized path of an actorRef, based on the current transport serialization information. If there is no external address available in the givenActorRefthen the systems default address will be used and that is retrieved from the ThreadLocalSerialization.Informationthat was set withSerialization.withTransportInformation(org.apache.pekko.actor.ExtendedActorSystem, scala.Function0<T>). -
withTransportInformation
Sets serialization information in aThreadLocaland runsf. The information is needed for serializing local actor refs, or if serializer library e.g. custom serializer/deserializer in Jackson need access to the currentActorSystem. The currentInformationcan be accessed withinfviaSerialization.getCurrentTransportInformation().Pekko Remoting sets this value when serializing and deserializing messages, and when using the ordinary
serializeanddeserializemethods inSerializationthe value is also set automatically.- Returns:
- value returned by
f
-
getCurrentTransportInformation
Gets the serialization information from aThreadLocalthat was assigned viaSerialization.withTransportInformation(org.apache.pekko.actor.ExtendedActorSystem, scala.Function0<T>). The information is needed for serializing local actor refs, or if serializer library e.g. custom serializer/deserializer in Jackson need access to the currentActorSystem.- Throws:
IllegalStateException- if the information was not set
-