Package org.akka.essentials.java.future.example.messages

Examples of org.akka.essentials.java.future.example.messages.Address


  @Override
  public void onReceive(Object message) throws Exception {
    if (message instanceof Integer) {
      Integer userId = (Integer) message;
      // ideally we will get address for given user id
      Address address = new Address(userId, "Munish Gupta",
          "Sarjapura Road", "Bangalore, India");
      getSender().tell(address);
    }
  }
View Full Code Here


      final Future<OrderHistory> aggResult = aggregate.map(
          new Mapper<Iterable<Object>, OrderHistory>() {
            public OrderHistory apply(Iterable<Object> coll) {
              final Iterator<Object> it = coll.iterator();
              final Order order = (Order) it.next();
              final Address address = (Address) it.next();
              return new OrderHistory(order, address);
            }
          }, getContext().system().dispatcher());
      // aggregated result is piped to another actor
      pipe(aggResult, getContext().system().dispatcher()).to(
View Full Code Here

TOP

Related Classes of org.akka.essentials.java.future.example.messages.Address

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.