public class ProtobufSerializer extends java.lang.Object implements BaseSerializer
akka.protobuf.Message
and com.google.protobuf.Message
It is using reflection to find the parseFrom
and toByteArray
methods to avoid
dependency to com.google.protobuf
.Constructor and Description |
---|
ProtobufSerializer()
Deprecated.
Use constructor with ExtendedActorSystem. Since 2.4.
|
ProtobufSerializer(ExtendedActorSystem system) |
Modifier and Type | Method and Description |
---|---|
protected abstract static void |
akka$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1) |
java.lang.Class<?>[] |
ARRAY_OF_BYTE_ARRAY()
Deprecated.
Will be removed without replacement. Since 2.4.
|
static ActorRef |
deserializeActorRef(ExtendedActorSystem system,
WireFormats.ActorRefData refProtocol)
Helper to materialize (lookup) an
ActorRef
from Akka's protobuf representation in the supplied
ActorSystem . |
java.lang.Object |
fromBinary(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.
|
int |
identifier()
Globally unique serialization identifier configured in the
reference.conf . |
static int |
identifierFromConfig() |
boolean |
includeManifest()
Returns whether this serializer needs a manifest in the fromBinary method
|
static java.lang.String |
SerializationIdentifiers() |
static WireFormats.ActorRefData |
serializeActorRef(ActorRef ref)
Helper to serialize an
ActorRef to Akka's
protobuf representation. |
ExtendedActorSystem |
system()
Actor system which is required by most serializer implementations.
|
byte[] |
toBinary(java.lang.Object obj)
Serializes the given object into an Array of Byte
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
identifierFromConfig, SerializationIdentifiers
fromBinary, fromBinary
public ProtobufSerializer(ExtendedActorSystem system)
public ProtobufSerializer()
public static WireFormats.ActorRefData serializeActorRef(ActorRef ref)
ActorRef
to Akka's
protobuf representation.ref
- (undocumented)public static ActorRef deserializeActorRef(ExtendedActorSystem system, WireFormats.ActorRefData refProtocol)
ActorRef
from Akka's protobuf representation in the supplied
ActorSystem
.system
- (undocumented)refProtocol
- (undocumented)public static final java.lang.String SerializationIdentifiers()
public static int identifierFromConfig()
protected abstract static void akka$serialization$BaseSerializer$_setter_$identifier_$eq(int x$1)
public ExtendedActorSystem system()
BaseSerializer
system
in interface BaseSerializer
public int identifier()
BaseSerializer
reference.conf
.
identifier
in interface BaseSerializer
identifier
in interface Serializer
public java.lang.Class<?>[] ARRAY_OF_BYTE_ARRAY()
public boolean includeManifest()
Serializer
includeManifest
in interface Serializer
public java.lang.Object fromBinary(byte[] bytes, scala.Option<java.lang.Class<?>> manifest)
Serializer
fromBinary
in interface Serializer
bytes
- (undocumented)manifest
- (undocumented)public byte[] toBinary(java.lang.Object obj)
Serializer
toBinary
in interface Serializer
obj
- (undocumented)