public class Akka extends Object implements Jooby.Module
Concurrent and distributed applications via Akka.
ActorSystem
{
use(new Akka());
get("/akka", promise((req, deferred) -> {
ActorSystem sys = req.require(ActorSystem.class);
ActorRef actor = sys.actorOf(...);
// send the deferred to the actor
actor.tell(deferred, actor);
});
}
| Constructor and Description |
|---|
Akka()
Creates a new
Akka module. |
Akka(String name)
Creates a new
Akka module. |
| Modifier and Type | Method and Description |
|---|---|
com.typesafe.config.Config |
config() |
void |
configure(Env env,
com.typesafe.config.Config conf,
com.google.inject.Binder binder) |
public Akka(String name)
Akka module.name - Name of the ActorSystem.public Akka()
Akka module.public void configure(Env env, com.typesafe.config.Config conf, com.google.inject.Binder binder)
configure in interface Jooby.Modulepublic com.typesafe.config.Config config()
config in interface Jooby.ModuleCopyright © 2017. All rights reserved.