1
有没有办法从AKKA的ActorRef
获取演员姓名?从ActorRef获取AKKA演员姓名
我指的是名义人给跟个演员:
val myActorRef = context.actorOf(props, "MyActorName")
有没有办法从AKKA的ActorRef
获取演员姓名?从ActorRef获取AKKA演员姓名
我指的是名义人给跟个演员:
val myActorRef = context.actorOf(props, "MyActorName")
名称是从路径访问:
val name = myActorRef.path.name
同样的,名字也是路径中的元素:
val nameAgain = myActorRef.path.elements.last