Package javaguide.akka.HelloActorProtocol

Examples of javaguide.akka.HelloActorProtocol.SayHello


    @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);
                    }
                }
View Full Code Here


    @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(response -> ok((String) response));
    }
View Full Code Here

TOP

Related Classes of javaguide.akka.HelloActorProtocol.SayHello

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.