@Inject public Application(ActorSystem system) {
helloActor = system.actorOf(HelloActor.props);
}
public Promise<Result> sayHello(String name) {
return Promise.wrap(ask(helloActor, new SayHello(name), 1000)).map(
new Function<Object, Result>() {
public Result apply(Object response) {
return ok((String) response);
}
}