Merge branch 'wip-1190-remote-DeathWatch-∂π'

This commit is contained in:
Roland 2011-12-30 00:22:33 +01:00
commit fa2440aeca
26 changed files with 296 additions and 1599 deletions

View file

@ -60,6 +60,7 @@ abstract class RemoteClient private[akka] (
* Converts the message to the wireprotocol and sends the message across the wire
*/
def send(message: Any, senderOption: Option[ActorRef], recipient: ActorRef): Unit = if (isRunning) {
log.debug("Sending message: {}", message)
send(remoteSupport.createRemoteMessageProtocolBuilder(recipient, message, senderOption).build)
} else {
val exception = new RemoteClientException("RemoteModule client is not running, make sure you have invoked 'RemoteClient.connect()' before using it.", remoteSupport, remoteAddress)
@ -70,9 +71,7 @@ abstract class RemoteClient private[akka] (
/**
* Sends the message across the wire
*/
def send(request: RemoteMessageProtocol): Unit = {
log.debug("Sending message: {}", new RemoteMessage(request, remoteSupport.system))
private def send(request: RemoteMessageProtocol): Unit = {
try {
val payload = remoteSupport.createMessageSendEnvelope(request)
currentChannel.write(payload).addListener(