diff --git a/akka-docs/java/guice-integration.rst b/akka-docs/java/guice-integration.rst deleted file mode 100644 index 712371a87c..0000000000 --- a/akka-docs/java/guice-integration.rst +++ /dev/null @@ -1,50 +0,0 @@ -Guice Integration -================= - -All Typed Actors support dependency injection using `Guice `_ annotations (such as ‘@Inject’ etc.). -The ‘TypedActorManager’ class understands Guice and will do the wiring for you. - -External Guice modules ----------------------- - -You can also plug in external Guice modules and have not-actors wired up as part of the configuration. -Here is an example: - -.. code-block:: java - - import static akka.config.Supervision.*; - import static akka.config.SupervisorConfig.*; - - TypedActorConfigurator manager = new TypedActorConfigurator(); - - manager.configure( - new AllForOneStrategy(new Class[]{Exception.class}, 3, 1000), - new SuperviseTypedActor[] { - new SuperviseTypedActor( - Foo.class, - FooImpl.class, - temporary(), - 1000), - new SuperviseTypedActor( - Bar.class, - BarImpl.class, - permanent(), - 1000) - }) - .addExternalGuiceModule(new AbstractModule() { - protected void configure() { - bind(Ext.class).to(ExtImpl.class).in(Scopes.SINGLETON); - }}) - .configure() - .inject() - .supervise(); - -Retrieve the external Guice dependency --------------------------------------- - -The external dependency can be retrieved like this: - -.. code-block:: java - - Ext ext = manager.getExternalDependency(Ext.class); - diff --git a/akka-docs/java/index.rst b/akka-docs/java/index.rst index 05273b84b5..bf0d35b2bf 100644 --- a/akka-docs/java/index.rst +++ b/akka-docs/java/index.rst @@ -16,5 +16,4 @@ Java API fault-tolerance dispatchers routing - guice-integration extending-akka