通过案例解析Akka中的Actor的定义和创建

学习通过案例解析Akka中的Actor的定义和创建,用ActorSystem指定名称,应用_system实例actorOf方法创建Actor,应用Props指定Actor类型,创建过中直接启动Actor

案例如下:

val _system=ActorSystem("HelloAkka")

val master=_system.actorOf(Props[MasterActor], name="master")

posted on 2015-09-16 13:28  l_time  阅读(223)  评论(0)    收藏  举报

导航