Package akka.serialization
Interface Serializer
-
- All Known Subinterfaces:
BaseSerializer
- All Known Implementing Classes:
AbstractSerializationSupport,AkkaClusterTypedSerializer,ArteryMessageSerializer,AsyncSerializerWithStringManifest,AsyncSerializerWithStringManifestCS,BooleanSerializer,ByteArraySerializer,ByteStringSerializer,ClusterClientMessageSerializer,ClusterMessageSerializer,ClusterShardingMessageSerializer,ClusterSingletonMessageSerializer,DaemonMsgCreateSerializer,DisabledJavaSerializer,DistributedPubSubMessageSerializer,IntSerializer,JavaSerializer,JSerializer,LongSerializer,MessageContainerSerializer,MessageSerializer,MessageSerializer,MiscMessageSerializer,MiscMessageSerializer,NullSerializer,NullSerializer$,ProtobufSerializer,ReplicatedDataSerializer,ReplicatorMessageSerializer,SerializerWithStringManifest,ServiceKeySerializer,ShardingSerializer,SnapshotSerializer,StreamRefSerializer,StringSerializer,SystemMessageSerializer,TestMessageSerializer,TestSerializer
public interface SerializerCompletely unique value to identify this implementation of Serializer, used to optimize network traffic. Values from 0 to 40 are reserved for Akka internal usage.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectfromBinary(byte[] bytes)Java API: deserialize without type hintjava.lang.ObjectfromBinary(byte[] bytes, java.lang.Class<?> clazz)Java API: deserialize with type hintjava.lang.ObjectfromBinary(byte[] bytes, scala.Option<java.lang.Class<?>> manifest)Produces an object from an array of bytes, with an optional type-hint; the class should be loaded using ActorSystem.dynamicAccess.intidentifier()Completely unique value to identify this implementation of Serializer, used to optimize network traffic.booleanincludeManifest()Returns whether this serializer needs a manifest in the fromBinary methodbyte[]toBinary(java.lang.Object o)Serializes the given object into an Array of Byte
-
-
-
Method Detail
-
fromBinary
java.lang.Object fromBinary(byte[] bytes, scala.Option<java.lang.Class<?>> manifest) throws java.io.NotSerializableExceptionProduces an object from an array of bytes, with an optional type-hint; the class should be loaded using ActorSystem.dynamicAccess.- Parameters:
bytes- (undocumented)manifest- (undocumented)- Returns:
- (undocumented)
- Throws:
java.io.NotSerializableException
-
fromBinary
java.lang.Object fromBinary(byte[] bytes)
Java API: deserialize without type hint- Parameters:
bytes- (undocumented)- Returns:
- (undocumented)
-
fromBinary
java.lang.Object fromBinary(byte[] bytes, java.lang.Class<?> clazz) throws java.io.NotSerializableExceptionJava API: deserialize with type hint- Parameters:
bytes- (undocumented)clazz- (undocumented)- Returns:
- (undocumented)
- Throws:
java.io.NotSerializableException
-
identifier
int identifier()
Completely unique value to identify this implementation of Serializer, used to optimize network traffic. Values from 0 to 40 are reserved for Akka internal usage.- Returns:
- (undocumented)
-
includeManifest
boolean includeManifest()
Returns whether this serializer needs a manifest in the fromBinary method- Returns:
- (undocumented)
-
toBinary
byte[] toBinary(java.lang.Object o)
Serializes the given object into an Array of Byte- Parameters:
o- (undocumented)- Returns:
- (undocumented)
-
-