More props factories, see #3418

This commit is contained in:
Patrik Nordwall 2013-05-31 08:09:56 +02:00
parent 51ed174432
commit 1dac00a129
3 changed files with 5 additions and 5 deletions

View file

@ -59,7 +59,7 @@ class DemoActorWrapper extends Actor {
* @return a Props for creating this actor, which can then be further configured
* (e.g. calling `.withDispatcher()` on it)
*/
def apply(name: String): Props = Props(classOf[DemoActor], name)
def props(name: String): Props = Props(classOf[DemoActor], name)
}
class DemoActor(name: String) extends Actor {
@ -70,7 +70,7 @@ class DemoActorWrapper extends Actor {
// ...
context.actorOf(DemoActor("hello"))
context.actorOf(DemoActor.props("hello"))
//#props-factory
def receive = Actor.emptyBehavior