use of cn.vobile.akka.actor.WatcherActor in project lzl_workspace by hpulzl.
the class SpringDiActorService method doSpringActor.
public void doSpringActor(ApplicationContext applicationContext) {
// 获取actorSystem
ActorSystem actorSystem = (ActorSystem) applicationContext.getBean("actorSystem");
// 初始化数据
springExtension.initialize(applicationContext);
ActorRef actorRef = actorSystem.actorOf(springExtension.props("integrationWithSpringActor"), "integrationWithSpringActor");
// 监听actor执行完毕后,直接退出system
actorSystem.actorOf(Props.create(WatcherActor.class, actorRef), "watcherActor");
actorRef.tell(1, ActorRef.noSender());
}
Aggregations