Fixed even more comments on the remoting. See #1175

This commit is contained in:
Henrik Engstrom 2011-12-15 23:47:12 +01:00
parent 9b39b9411f
commit 215c77672c
3 changed files with 15 additions and 7 deletions

View file

@ -9,7 +9,7 @@ public class RemoteActorExample extends UntypedActor {
//#localNodeActor
//#remoteNodeActor
ActorRef a2 = getContext().actorFor("akka://app@10.0.0.1:2552/user/theActor");
ActorRef a2 = getContext().actorFor("akka://app@10.0.0.1:2552/user/serviceA/retrieval");
//#remoteNodeActor
public void onReceive(Object message) throws Exception {

View file

@ -61,11 +61,15 @@ The "app" in this case refers to the name of the ``ActorSystem``::
Logical path lookup is supported on the node you are on, i.e. to use the
actor created above you would do the following:
.. includecode:: code/akka/docs/remoting/RemoteActorExample.java#localNodeActor
.. includecode:: code/akka/docs/remoting/RemoteActorExample.java#localNodeActor
To use an actor on a remote node:
This will obtain an ``ActorRef`` on a remote node:
.. includecode:: code/akka/docs/remoting/RemoteActorExample.java#remoteNodeActor
.. includecode:: code/akka/docs/remoting/RemoteActorExample.java#remoteNodeActor
As you can see from the example above the following pattern is used to find an ``ActorRef`` on a remote node::
akka://<actorsystemname>@<hostname>:<port>/<actor path>
Serialization
^^^^^^^^^^^^^

View file

@ -65,11 +65,15 @@ The "app" in this case refers to the name of the ``ActorSystem``::
Logical path lookup is supported on the node you are on, i.e. to use the
actor created above you would do the following::
val actor = actorFor("/serviceA/retrieval")
val actor = context.actorFor("/serviceA/retrieval")
To use an actor on a remote node::
This will obtain an ``ActorRef`` on a remote node::
val actor = actorFor("akka://app@10.0.0.1:2552/user/theActor")
val actor = context.actorFor("akka://app@10.0.0.1:2552/user/serviceA/retrieval")
As you can see from the example above the following pattern is used to find an ``ActorRef`` on a remote node::
akka://<actorsystemname>@<hostname>:<port>/<actor path>
Serialization
^^^^^^^^^^^^^