Package

akka

guice

Permalink

package guice

Visibility
  1. Public
  2. All

Type Members

  1. trait ActorInject extends AnyRef

    Permalink

    Manages the client side of injecting Actors.

    Manages the client side of injecting Actors.

    This can be mixed into any class at all but you will only be able to inject actors at the top level if you don't have an ActorRefFactory handy.

    This defines both top-level actor injection (using an ActorSystem obtained from Guice) which should work anywhere as well as injecting child actors if there is an implicit ActorRefFactory available as there is in all actors.

  2. trait ActorModule extends AnyRef

    Permalink

    Helpers to define Guice Modules that define Actor bindings.

    Helpers to define Guice Modules that define Actor bindings.

    This uses InjectedActorFactory with Guice to generate new ActorRefs using a ActorRefFactory that is provided by the client. This will be safe but may be less than ideal in some cases.

  3. class AkkaModule extends AbstractModule with ScalaModule

    Permalink

    Simply Guice Module to make an ActorSystem available.

  4. trait InjectableActor extends Actor with ActorInject

    Permalink

    The main trait used when creating an Actor that supports Guice.

    The main trait used when creating an Actor that supports Guice.

    This trait arranges with Guice to handle injection via members. Constructor injection is not supported and can't be easily supported due to the way Akka instantiates Actor's.

  5. class InjectedActorFactory[T <: Actor with InjectableActor] extends AnyRef

    Permalink

    This is the workhorse for generating and injecting new Actors.

    This is the workhorse for generating and injecting new Actors.

    This is really an internal class. It manages the link between Guice Module and the client classes wishing to inject Actors. It acts as a type-safe factory wrapper to pass into Guice and interacts with Akka to generate new instances of Actors.

    T

    The type of Actor to inject.

  6. trait RunnableActorInject extends Runnable with ActorInject

    Permalink

    This makes for a good type for entry points.

    This makes for a good type for entry points.

    Using something like this means that the main entrypoint can be limited to doing a minimal Guice bootstrap which can then be used to load everything else in your application.

    Unlike ActorInject, this trait will get the injector automatically injected.

Ungrouped