Merge branch 'master' into wip-1361-modularize-config-reference-patriknw

Conflicts:
	akka-actor/src/main/resources/akka-actor-reference.conf
	akka-actor/src/main/scala/akka/actor/ActorRefProvider.scala
	akka-actor/src/main/scala/akka/actor/ActorSystem.scala
	akka-remote/src/main/scala/akka/remote/Gossiper.scala
	akka-remote/src/main/scala/akka/remote/netty/NettyRemoteSupport.scala
This commit is contained in:
Patrik Nordwall 2011-11-24 14:56:19 +01:00
commit c53d5e16e5
18 changed files with 189 additions and 139 deletions

View file

@ -281,6 +281,8 @@ trait RemoteMarshallingOps {
def system: ActorSystem
protected def useUntrustedMode: Boolean
def createMessageSendEnvelope(rmp: RemoteMessageProtocol): AkkaRemoteProtocol = {
val arp = AkkaRemoteProtocol.newBuilder
arp.setMessage(rmp)
@ -323,15 +325,15 @@ trait RemoteMarshallingOps {
messageBuilder
}
def receiveMessage(remoteMessage: RemoteMessage, untrustedMode: Boolean) {
def receiveMessage(remoteMessage: RemoteMessage) {
val recipient = remoteMessage.recipient
remoteMessage.payload match {
case Left(t) throw t
case Right(r) r match {
case _: Terminate if (untrustedMode) throw new SecurityException("RemoteModule server is operating is untrusted mode, can not stop the actor") else recipient.stop()
case _: AutoReceivedMessage if (untrustedMode) throw new SecurityException("RemoteModule server is operating is untrusted mode, can not pass on a AutoReceivedMessage to the remote actor")
case m recipient.!(m)(remoteMessage.sender)
case _: Terminate if (useUntrustedMode) throw new SecurityException("RemoteModule server is operating is untrusted mode, can not stop the actor") else recipient.stop()
case _: AutoReceivedMessage if (useUntrustedMode) throw new SecurityException("RemoteModule server is operating is untrusted mode, can not pass on a AutoReceivedMessage to the remote actor")
case m recipient.!(m)(remoteMessage.sender)
}
}
}