Hide Echo actor impl from docs, see #2537
This commit is contained in:
parent
5a2ebb172d
commit
b21687dbf2
4 changed files with 8 additions and 12 deletions
|
|
@ -21,13 +21,11 @@ import akka.actor.UntypedActor;
|
|||
|
||||
public class RemoteDeploymentDocTestBase {
|
||||
|
||||
//#sample-actor
|
||||
public static class Echo extends UntypedActor {
|
||||
public static class SampleActor extends UntypedActor {
|
||||
public void onReceive(Object message) {
|
||||
getSender().tell(getSelf(), getSelf());
|
||||
}
|
||||
}
|
||||
//#sample-actor
|
||||
|
||||
static ActorSystem system;
|
||||
|
||||
|
|
@ -48,7 +46,7 @@ public class RemoteDeploymentDocTestBase {
|
|||
addr = AddressFromURIString.parse("akka://sys@host:1234"); // the same
|
||||
//#make-address
|
||||
//#deploy
|
||||
ActorRef ref = system.actorOf(new Props(Echo.class).withDeploy(new Deploy(new RemoteScope(addr))));
|
||||
ActorRef ref = system.actorOf(new Props(SampleActor.class).withDeploy(new Deploy(new RemoteScope(addr))));
|
||||
//#deploy
|
||||
assert ref.path().address().equals(addr);
|
||||
}
|
||||
|
|
@ -57,7 +55,7 @@ public class RemoteDeploymentDocTestBase {
|
|||
public void demonstrateSampleActor() {
|
||||
//#sample-actor
|
||||
|
||||
ActorRef actor = system.actorOf(new Props(Echo.class), "sampleActor");
|
||||
ActorRef actor = system.actorOf(new Props(SampleActor.class), "sampleActor");
|
||||
actor.tell("Pretty slick", null);
|
||||
//#sample-actor
|
||||
}
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ Once you have configured the properties above you would do the following in code
|
|||
|
||||
.. includecode:: code/docs/remoting/RemoteDeploymentDocTestBase.java#sample-actor
|
||||
|
||||
The actor class ``Echo`` has to be available to the runtimes using it, i.e. the classloader of the
|
||||
The actor class ``SampleActor`` has to be available to the runtimes using it, i.e. the classloader of the
|
||||
actor systems has to have a JAR containing the class.
|
||||
|
||||
.. note::
|
||||
|
|
|
|||
|
|
@ -12,11 +12,9 @@ import akka.remote.RemoteScope
|
|||
|
||||
object RemoteDeploymentDocSpec {
|
||||
|
||||
//#sample-actor
|
||||
class Echo extends Actor {
|
||||
class SampleActor extends Actor {
|
||||
def receive = { case _ ⇒ sender ! self }
|
||||
}
|
||||
//#sample-actor
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -34,7 +32,7 @@ class RemoteDeploymentDocSpec extends AkkaSpec("""
|
|||
|
||||
"demonstrate programmatic deployment" in {
|
||||
//#deploy
|
||||
val ref = system.actorOf(Props[Echo].withDeploy(Deploy(scope = RemoteScope(address))))
|
||||
val ref = system.actorOf(Props[SampleActor].withDeploy(Deploy(scope = RemoteScope(address))))
|
||||
//#deploy
|
||||
ref.path.address must be(address)
|
||||
ref ! "test"
|
||||
|
|
@ -52,7 +50,7 @@ class RemoteDeploymentDocSpec extends AkkaSpec("""
|
|||
"demonstrate sampleActor" in {
|
||||
//#sample-actor
|
||||
|
||||
val actor = system.actorOf(Props[Echo], "sampleActor")
|
||||
val actor = system.actorOf(Props[SampleActor], "sampleActor")
|
||||
actor ! "Pretty slick"
|
||||
//#sample-actor
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ Once you have configured the properties above you would do the following in code
|
|||
|
||||
.. includecode:: code/docs/remoting/RemoteDeploymentDocSpec.scala#sample-actor
|
||||
|
||||
The actor class ``Echo`` has to be available to the runtimes using it, i.e. the classloader of the
|
||||
The actor class ``SampleActor`` has to be available to the runtimes using it, i.e. the classloader of the
|
||||
actor systems has to have a JAR containing the class.
|
||||
|
||||
.. note::
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue