[akka-user] How to serialize an Any?

2015-01-22 Thread Kevin Esler
I am puzzled by something: Akka messages can be of type Any, yet akka.seriailziation.Serialization.serialize() required an AnyRef as the type of the object to be serialized. So how does Akka serialize a message that is not an AnyRef? (Reason for asking: I plan to use Akka serialization and wou

Re: [akka-user] How to serialize an Any?

2015-01-23 Thread Martynas Mickevičius
Hi Kevin, do you want to serialize your custom Value Classes? In such case add Serializable trait to the value class, and write your serializer for that. All the built in scala types that extend AnyVal (Int, Double, Short, ...) are serialized and sent through the wire as their java.lang counterp