Profit! Removing Uuids from ActorCells and ActorRefs and essentially replacing the remoting with a new implementation.

This commit is contained in:
Viktor Klang 2011-11-03 14:53:38 +01:00
parent 2f52f43fa8
commit a040a0c54d
21 changed files with 1393 additions and 5859 deletions

View file

@ -14,12 +14,12 @@ object MessageSerializer {
def deserialize(app: AkkaApplication, messageProtocol: MessageProtocol, classLoader: Option[ClassLoader] = None): AnyRef = {
val clazz = loadManifest(classLoader, messageProtocol)
app.serialization.deserialize(messageProtocol.getMessage.toByteArray,
clazz, classLoader).fold(x throw x, o o)
clazz, classLoader).fold(x throw x, identity)
}
def serialize(app: AkkaApplication, message: AnyRef): MessageProtocol = {
val builder = MessageProtocol.newBuilder
val bytes = app.serialization.serialize(message).fold(x throw x, b b)
val bytes = app.serialization.serialize(message).fold(x throw x, identity)
builder.setMessage(ByteString.copyFrom(bytes))
builder.setMessageManifest(ByteString.copyFromUtf8(message.getClass.getName))
builder.build