add small hint for programmatic remoting config, see #2604
This commit is contained in:
parent
89c1f66b1f
commit
2bf9b32b48
3 changed files with 24 additions and 0 deletions
|
|
@ -7,6 +7,8 @@ import org.junit.AfterClass;
|
|||
import org.junit.BeforeClass;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.typesafe.config.ConfigFactory;
|
||||
|
||||
//#import
|
||||
import akka.actor.ActorRef;
|
||||
import akka.actor.Address;
|
||||
|
|
@ -60,6 +62,14 @@ public class RemoteDeploymentDocTestBase {
|
|||
actor.tell("Pretty slick", null);
|
||||
//#sample-actor
|
||||
}
|
||||
|
||||
@Test
|
||||
public void demonstrateProgrammaticConfig() {
|
||||
//#programmatic
|
||||
ConfigFactory.parseString("akka.remote.netty.hostname=\"1.2.3.4\"")
|
||||
.withFallback(ConfigFactory.load());
|
||||
//#programmatic
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -60,6 +60,13 @@ reference file for more information:
|
|||
.. literalinclude:: ../../../akka-remote/src/main/resources/reference.conf
|
||||
:language: none
|
||||
|
||||
.. note::
|
||||
|
||||
Setting properties like the listening IP and port number programmatically is
|
||||
best done by using something like the following:
|
||||
|
||||
.. includecode:: code/docs/remoting/RemoteDeploymentDocTestBase.java#programmatic
|
||||
|
||||
Looking up Remote Actors
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,13 @@ reference file for more information:
|
|||
.. literalinclude:: ../../../akka-remote/src/main/resources/reference.conf
|
||||
:language: none
|
||||
|
||||
.. note::
|
||||
|
||||
Setting properties like the listening IP and port number programmatically is
|
||||
best done by using something like the following:
|
||||
|
||||
.. includecode:: ../java/code/docs/remoting/RemoteDeploymentDocTestBase.java#programmatic
|
||||
|
||||
Types of Remote Interaction
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue