Change the package name of all classes in remote module to 'akka.remote'.

Signed-off-by: Jonas Bonér <jonas@jonasboner.com>
This commit is contained in:
Jonas Bonér 2011-09-20 21:44:50 +02:00
parent 7bc698f864
commit 978cbe4437
22 changed files with 1024 additions and 1012 deletions

View file

@ -265,23 +265,24 @@ trait BasicRouter extends Router {
def route(message: Any)(implicit sender: Option[ActorRef]) = message match {
case Routing.Broadcast(message)
//it is a broadcast message, we are going to send to message to all connections.
connections.versionedIterable.iterable.foreach(actor
connections.versionedIterable.iterable foreach { connection
try {
actor.!(message)(sender) // we use original sender, so this is essentially a 'forward'
connection.!(message)(sender) // we use original sender, so this is essentially a 'forward'
} catch {
case e: Exception
connections.remove(actor)
connections.remove(connection)
throw e
})
}
}
case _
//it no broadcast message, we are going to select an actor from the connections and send the message to him.
next match {
case Some(actor)
case Some(connection)
try {
actor.!(message)(sender) // we use original sender, so this is essentially a 'forward'
connection.!(message)(sender) // we use original sender, so this is essentially a 'forward'
} catch {
case e: Exception
connections.remove(actor)
connections.remove(connection)
throw e
}
case None
@ -295,13 +296,13 @@ trait BasicRouter extends Router {
case _
//it no broadcast message, we are going to select an actor from the connections and send the message to him.
next match {
case Some(actor)
case Some(connection)
try {
// FIXME is this not wrong? it will not pass on and use the original Future but create a new one. Should reuse 'channel: UntypedChannel' in the AbstractRoutedActorRef
actor.?(message, timeout)(sender).asInstanceOf[Future[T]]
connection.?(message, timeout)(sender).asInstanceOf[Future[T]]
} catch {
case e: Exception
connections.remove(actor)
connections.remove(connection)
throw e
}
case None