More props factories, see #3418
This commit is contained in:
parent
51ed174432
commit
1dac00a129
3 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue