Package akka.serialization

Examples of akka.serialization.Serializer.toBinary()


    // Get the Binded Serializer for it
    Serializer serializer = serialization
        .findSerializerFor(originalMessage);

    // Turn the object into bytes
    byte[] bytes = serializer.toBinary(originalMessage);

    // Turn the byte[] back into an object,
    MyMessage deSerializedMessage = (MyMessage) serializer.fromBinary(
        bytes, MyMessage.class);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.