diff --git a/akka-core/src/main/scala/actor/ActorRef.scala b/akka-core/src/main/scala/actor/ActorRef.scala index ec96b87bf2..2491863a11 100644 --- a/akka-core/src/main/scala/actor/ActorRef.scala +++ b/akka-core/src/main/scala/actor/ActorRef.scala @@ -40,7 +40,7 @@ import java.lang.reflect.Field *
* Protobuf Message -> ActorRef: *- * val actorRef = ActorRef.fromProtocol(protobufMessage) + * val actorRef = ActorRef.fromProtobuf(protobufMessage) * actorRef ! message // send message to remote actor through its reference ** @author Jonas Bonér @@ -51,15 +51,15 @@ object ActorRef { * Deserializes the ActorRef instance from a byte array (Array[Byte]) into an ActorRef instance. */ def fromBinary(bytes: Array[Byte]): ActorRef = - fromProtocol(ActorRefProtocol.newBuilder.mergeFrom(bytes).build, None) + fromProtobuf(ActorRefProtocol.newBuilder.mergeFrom(bytes).build, None) def fromBinary(bytes: Array[Byte], loader: ClassLoader): ActorRef = - fromProtocol(ActorRefProtocol.newBuilder.mergeFrom(bytes).build, Some(loader)) + fromProtobuf(ActorRefProtocol.newBuilder.mergeFrom(bytes).build, Some(loader)) /** * Deserializes the ActorRef instance from a Protocol Buffers (protobuf) Message into an ActorRef instance. */ - private[akka] def fromProtocol(protocol: ActorRefProtocol, loader: Option[ClassLoader]): ActorRef = + private[akka] def fromProtobuf(protocol: ActorRefProtocol, loader: Option[ClassLoader]): ActorRef = RemoteActorRef( protocol.getUuid, protocol.getActorClassName, @@ -527,7 +527,7 @@ trait ActorRef extends TransactionManagement { */ def shutdownLinkedActors: Unit - protected[akka] def toProtocol: ActorRefProtocol + protected[akka] def toProtobuf: ActorRefProtocol protected[akka] def invoke(messageHandle: MessageInvocation): Unit @@ -572,7 +572,7 @@ trait ActorRef extends TransactionManagement { protected def processSender(senderOption: Option[ActorRef], requestBuilder: RemoteRequestProtocol.Builder) = { senderOption.foreach { sender => RemoteServer.getOrCreateServer(sender.homeAddress).register(sender.uuid, sender) - requestBuilder.setSender(sender.toProtocol) + requestBuilder.setSender(sender.toProtobuf) } } } @@ -609,7 +609,7 @@ sealed class LocalActorRef private[akka]( /** * Serializes the ActorRef instance into a Protocol Buffers (protobuf) Message. */ - protected[akka] def toProtocol: ActorRefProtocol = guard.withGuard { + protected[akka] def toProtobuf: ActorRefProtocol = guard.withGuard { val host = homeAddress.getHostName val port = homeAddress.getPort @@ -637,7 +637,7 @@ sealed class LocalActorRef private[akka]( /** * Serializes the ActorRef instance into a byte array (Array[Byte]). */ - def toBinary: Array[Byte] = toProtocol.toByteArray + def toBinary: Array[Byte] = toProtobuf.toByteArray /** * Returns the class for the Actor instance that is managed by the ActorRef. @@ -947,7 +947,7 @@ sealed class LocalActorRef private[akka]( .setIsOneWay(false) .setIsEscaped(false) - //senderOption.foreach(sender => requestBuilder.setSender(sender.toProtocol)) + //senderOption.foreach(sender => requestBuilder.setSender(sender.toProtobuf)) RemoteProtocolBuilder.setMessage(message, requestBuilder) val id = registerSupervisorAsRemoteActor @@ -1292,7 +1292,7 @@ private[akka] case class RemoteActorRef private[akka] ( def mailboxSize: Int = unsupported def supervisor: Option[ActorRef] = unsupported def shutdownLinkedActors: Unit = unsupported - protected[akka] def toProtocol: ActorRefProtocol = unsupported + protected[akka] def toProtobuf: ActorRefProtocol = unsupported protected[akka] def mailbox: Deque[MessageInvocation] = unsupported protected[akka] def restart(reason: Throwable): Unit = unsupported protected[akka] def handleTrapExit(dead: ActorRef, reason: Throwable): Unit = unsupported diff --git a/akka-core/src/main/scala/remote/RemoteServer.scala b/akka-core/src/main/scala/remote/RemoteServer.scala index 782775e2a3..3b02a3a850 100644 --- a/akka-core/src/main/scala/remote/RemoteServer.scala +++ b/akka-core/src/main/scala/remote/RemoteServer.scala @@ -366,7 +366,7 @@ class RemoteServerHandler( val message = RemoteProtocolBuilder.getMessage(request) if (request.hasSender) { val sender = request.getSender - if (sender ne null) actorRef.!(message)(Some(ActorRef.fromProtocol(sender, applicationLoader))) + if (sender ne null) actorRef.!(message)(Some(ActorRef.fromProtobuf(sender, applicationLoader))) } else { try { val resultOrNone = actorRef !! message