Scala akka Actor对于路径 [英] Scala akka ActorFor path

查看:108
本文介绍了Scala akka Actor对于路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我在远程系统上查找参与者的代码:

Here is my code for finding an actor on my remote system:

Application.system.actorFor("akka://ActorApplication@172.17.100.232:2552/home/louis/scala/remoteActor")

我想我

这是正确的吗?

/ home / louis / scala /

/home/louis/scala/

是Play的位置!在远程服务器上的项目。

Is the location of the Play! project on the remote server. And then "remoteActor" is the name if the actor.

但是它从不返回ActorRef对象,它始终为null。

But it is never returning an ActorRef object, it is always null.

推荐答案

否,地址应该为:

"akka://ActorApplication@172.17.100.232:2552/user/remoteActor"

这假定 ActorApplication 确实是您尝试在:2552上访问的actor系统的正确名称。 URL的 / user / 部分表明它是您在该系统中创建的参与者。 (您是用户)

This assumes that ActorApplication is indeed the correct name for the actor system you are trying to access on :2552. The /user/ portion of the url indicates it is a actor you created in that system. (you being the "user")

这篇关于Scala akka Actor对于路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆