From b346dcfbab91608da9d2785e26839d4617909d9e Mon Sep 17 00:00:00 2001 From: Zahari Dichev Date: Mon, 8 May 2017 12:09:58 +0300 Subject: [PATCH] Removed Scala code from Java docs #22811 --- akka-docs/rst/java/remoting-artery.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/akka-docs/rst/java/remoting-artery.rst b/akka-docs/rst/java/remoting-artery.rst index e521aa7f19..59115f22b8 100644 --- a/akka-docs/rst/java/remoting-artery.rst +++ b/akka-docs/rst/java/remoting-artery.rst @@ -49,7 +49,11 @@ Preparing your ActorSystem for Remoting The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project:: - "com.typesafe.akka" %% "akka-remote" % "@version@" @crossString@ + + com.typesafe.akka + akka-remote_@binVersion@ + @version@ + To enable remote capabilities in your Akka project you should, at a minimum, add the following changes to your ``application.conf`` file:: @@ -134,8 +138,8 @@ Looking up Remote Actors ``actorSelection(path)`` will obtain an ``ActorSelection`` to an Actor on a remote node, e.g.:: - val selection = - context.actorSelection("akka://actorSystemName@10.0.0.1:25520/user/actorName") + ActorSelection selection = + context.actorSelection("akka://actorSystemName@10.0.0.1:25520/user/actorName"); As you can see from the example above the following pattern is used to find an actor on a remote node:: @@ -147,7 +151,7 @@ As you can see from the example above the following pattern is used to find an a Once you obtained a selection to the actor you can interact with it in the same way you would with a local actor, e.g.:: - selection ! "Pretty awesome feature" + selection.tell("Pretty awesome feature", getSelf()); To acquire an :class:`ActorRef` for an :class:`ActorSelection` you need to send a message to the selection and use the ``sender`` reference of the reply from @@ -303,7 +307,7 @@ Messages sent with actor selection are by default discarded in untrusted mode, b permission to receive actor selection messages can be granted to specific actors defined in configuration:: - akka.remote.artery..trusted-selection-paths = ["/user/receptionist", "/user/namingService"] + akka.remote.artery.trusted-selection-paths = ["/user/receptionist", "/user/namingService"] The actual message must still not be of type :class:`PossiblyHarmful`.