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

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


public class OrderAggregateActor extends UntypedActor {

  @Override
  public void onReceive(Object message) throws Exception {
    if (message instanceof OrderHistory) {
      OrderHistory orderHistory = (OrderHistory) message;
      System.out.println("Order History -> " + orderHistory.getOrder()
          + "\n" + orderHistory.getAddress());
    }
  }
View Full Code Here


          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(
          orderAggregateActor);
View Full Code Here

TOP

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

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.