Package org.springframework.integration.samples.cafe

Examples of org.springframework.integration.samples.cafe.Drink


                            Thread.currentThread().getName()
                                + " prepared hot drink #" + this.hotDrinkCounter.incrementAndGet()
                                + " for order #" + p.getOrderNumber() + ": " + p)
                        .handle(m -> System.out.println(m.getPayload()))))))
        .<OrderItem, Drink>transform(orderItem ->
            new Drink(orderItem.getOrderNumber(),
                orderItem.getDrinkType(),
                orderItem.isIced(),
                orderItem.getShots()))
        .aggregate(aggregator -> aggregator
            .outputProcessor(g ->
View Full Code Here


    try {
      Thread.sleep(this.hotDrinkDelay);
      logger.info(Thread.currentThread().getName()
          + " prepared hot drink #" + hotDrinkCounter.incrementAndGet() + " for order #"
          + orderItem.getOrderNumber() + ": " + orderItem);
      return new Drink(orderItem.getOrderNumber(), orderItem.getDrinkType(), orderItem.isIced(),
          orderItem.getShots());
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      return null;
    }
View Full Code Here

    try {
      Thread.sleep(this.coldDrinkDelay);
      logger.info(Thread.currentThread().getName()
          + " prepared cold drink #" + coldDrinkCounter.incrementAndGet() + " for order #"
          + orderItem.getOrderNumber() + ": " + orderItem);
      return new Drink(orderItem.getOrderNumber(), orderItem.getDrinkType(), orderItem.isIced(),
          orderItem.getShots());
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      return null;
    }
View Full Code Here

    try {
      Thread.sleep(this.hotDrinkDelay);
      logger.info(Thread.currentThread().getName()
          + " prepared hot drink #" + hotDrinkCounter.incrementAndGet() + " for order #"
          + orderItem.getOrderNumber() + ": " + orderItem);
      return new Drink(orderItem.getOrderNumber(), orderItem.getDrinkType(), orderItem.isIced(),
          orderItem.getShots());
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      return null;
    }
View Full Code Here

    try {
      Thread.sleep(this.coldDrinkDelay);
      logger.info(Thread.currentThread().getName()
          + " prepared cold drink #" + coldDrinkCounter.incrementAndGet() + " for order #"
          + orderItem.getOrderNumber() + ": " + orderItem);
      return new Drink(orderItem.getOrderNumber(), orderItem.getDrinkType(), orderItem.isIced(),
          orderItem.getShots());
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
      return null;
    }
View Full Code Here

TOP

Related Classes of org.springframework.integration.samples.cafe.Drink

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.