Renaming createActor to actorOf

This commit is contained in:
Viktor Klang 2011-10-18 17:56:23 +02:00
parent 3f258f8b63
commit 474787a81d
68 changed files with 343 additions and 343 deletions

View file

@ -15,15 +15,15 @@ abstract class AkkaSpec(_application: AkkaApplication = AkkaApplication())
def this(config: Configuration) = this(new AkkaApplication(getClass.getSimpleName, AkkaApplication.defaultConfig ++ config))
def createActor(props: Props): ActorRef = app.createActor(props)
def actorOf(props: Props): ActorRef = app.actorOf(props)
def createActor[T <: Actor](clazz: Class[T]): ActorRef = createActor(Props(clazz))
def actorOf[T <: Actor](clazz: Class[T]): ActorRef = actorOf(Props(clazz))
def createActor[T <: Actor: Manifest]: ActorRef = createActor(manifest[T].erasure.asInstanceOf[Class[_ <: Actor]])
def actorOf[T <: Actor: Manifest]: ActorRef = actorOf(manifest[T].erasure.asInstanceOf[Class[_ <: Actor]])
def createActor[T <: Actor](factory: T): ActorRef = createActor(Props(factory))
def actorOf[T <: Actor](factory: T): ActorRef = actorOf(Props(factory))
def spawn(body: Unit)(implicit dispatcher: MessageDispatcher) {
createActor(Props(ctx { case "go" try body finally ctx.self.stop() }).withDispatcher(dispatcher)) ! "go"
actorOf(Props(ctx { case "go" try body finally ctx.self.stop() }).withDispatcher(dispatcher)) ! "go"
}
}