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

@ -71,7 +71,7 @@ class EchoManager(handlerClass: Class[_]) extends Actor with ActorLogging {
}
object EchoHandler {
def apply(connection: ActorRef, remote: InetSocketAddress): Props =
def props(connection: ActorRef, remote: InetSocketAddress): Props =
Props(classOf[EchoHandler], connection, remote)
}

View file

@ -65,7 +65,7 @@ class SimplisticHandler extends Actor {
//#client
object Client {
def apply(remote: InetSocketAddress, replies: ActorRef) =
def props(remote: InetSocketAddress, replies: ActorRef) =
Props(classOf[Client], remote, replies)
}
@ -108,7 +108,7 @@ class IODocSpec extends AkkaSpec {
"demonstrate connect" in {
val server = system.actorOf(Props(classOf[Parent], this), "parent")
val listen = expectMsgType[Tcp.Bound].localAddress
val client = system.actorOf(Client(listen, testActor), "client1")
val client = system.actorOf(Client.props(listen, testActor), "client1")
val c1, c2 = expectMsgType[Tcp.Connected]
c1.localAddress must be(c2.remoteAddress)