Minor renames of parameters of non-user API an some code cleanup
This commit is contained in:
parent
39ca090110
commit
4c8360e8d7
3 changed files with 10 additions and 17 deletions
|
|
@ -339,9 +339,7 @@ class Index[K <: AnyRef, V <: AnyRef: Manifest] {
|
||||||
*/
|
*/
|
||||||
def foreach(fun: (K, V) ⇒ Unit) {
|
def foreach(fun: (K, V) ⇒ Unit) {
|
||||||
import scala.collection.JavaConversions._
|
import scala.collection.JavaConversions._
|
||||||
container.entrySet foreach { (e) ⇒
|
container.entrySet foreach { e ⇒ e.getValue.foreach(fun(e.getKey, _)) }
|
||||||
e.getValue.foreach(fun(e.getKey, _))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -22,13 +22,8 @@ final case class MessageInvocation(receiver: ActorRef,
|
||||||
senderFuture: Option[Promise[Any]]) {
|
senderFuture: Option[Promise[Any]]) {
|
||||||
if (receiver eq null) throw new IllegalArgumentException("Receiver can't be null")
|
if (receiver eq null) throw new IllegalArgumentException("Receiver can't be null")
|
||||||
|
|
||||||
def invoke() {
|
final def invoke() {
|
||||||
try {
|
receiver invoke this
|
||||||
receiver.invoke(this)
|
|
||||||
} catch {
|
|
||||||
case e: NullPointerException ⇒ throw new ActorInitializationException(
|
|
||||||
"Don't call 'self ! message' in the Actor's constructor (in Scala this means in the body of the class).")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -177,7 +172,7 @@ trait MessageDispatcher {
|
||||||
val uuid = i.next()
|
val uuid = i.next()
|
||||||
Actor.registry.local.actorFor(uuid) match {
|
Actor.registry.local.actorFor(uuid) match {
|
||||||
case Some(actor) ⇒ actor.stop()
|
case Some(actor) ⇒ actor.stop()
|
||||||
case None ⇒ {}
|
case None ⇒
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -137,12 +137,12 @@ trait Mist {
|
||||||
trait RootEndpointLocator {
|
trait RootEndpointLocator {
|
||||||
var root: ActorRef = null
|
var root: ActorRef = null
|
||||||
|
|
||||||
def configureRoot(id: String) {
|
def configureRoot(address: String) {
|
||||||
def findRoot(id: String): ActorRef =
|
def findRoot(address: String): ActorRef =
|
||||||
Actor.registry.actorFor(id).getOrElse(
|
Actor.registry.actorFor(address).getOrElse(
|
||||||
throw new ConfigurationException("akka.http.root-actor-id configuration option does not have a valid actor address [" + id + "]"))
|
throw new ConfigurationException("akka.http.root-actor-id configuration option does not have a valid actor address [" + address + "]"))
|
||||||
|
|
||||||
root = if ((id eq null) || id == "") findRoot(MistSettings.RootActorID) else findRoot(id)
|
root = if ((address eq null) || address == "") findRoot(MistSettings.RootActorID) else findRoot(address)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -288,7 +288,7 @@ class RootEndpoint extends Actor with Endpoint {
|
||||||
|
|
||||||
def recv: Receive = {
|
def recv: Receive = {
|
||||||
case NoneAvailable(uri, req) ⇒ _na(uri, req)
|
case NoneAvailable(uri, req) ⇒ _na(uri, req)
|
||||||
case unknown ⇒ {}
|
case unknown ⇒
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue