Examples of Cafe


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

   *
   * @param context spring context
   * @param count the number of standard orders
   */
  public static void order(AbstractApplicationContext context, int count){
    Cafe cafe = (Cafe) context.getBean("cafe");
    for (int i = 1; i <= count; i++) {
      Order order = new Order(i);
      order.addItem(DrinkType.LATTE, 2, false);
      order.addItem(DrinkType.MOCHA, 3, true);
      cafe.placeOrder(order);
    }
  }
View Full Code Here

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

   *
   * @param context spring context
   * @param count the number of standard orders
   */
  public static void order(AbstractApplicationContext context, int count){
    Cafe cafe = (Cafe) context.getBean("cafe");
    for (int i = 1; i <= count; i++) {
      Order order = new Order(i);
      order.addItem(DrinkType.LATTE, 2, false);
      order.addItem(DrinkType.MOCHA, 3, true);
      cafe.placeOrder(order);
    }
  }
View Full Code Here

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

   * place some orders
   * @param context spring context
   * @param count the number of standard orders
   */
  public static void order(AbstractApplicationContext context, int count){
    Cafe cafe = (Cafe) context.getBean("cafe");
    for (int i = 1; i <= 100; i++) {
      Order order = new Order(i);
      order.addItem(DrinkType.LATTE, 2, false);
      order.addItem(DrinkType.MOCHA, 3, true);
      cafe.placeOrder(order);
    }
  }
View Full Code Here

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

  public static void main(String[] args) {
    AbstractApplicationContext context =
      new ClassPathXmlApplicationContext("/META-INF/spring/integration/cafeDemo-annotation.xml", CafeDemoApp.class);

    Cafe cafe = (Cafe) context.getBean("cafe");
    for (int i = 1; i <= 100; i++) {
      Order order = new Order(i);
      order.addItem(DrinkType.LATTE, 2, false);
      order.addItem(DrinkType.MOCHA, 3, true);
      cafe.placeOrder(order);
    }
    context.close();
  }
View Full Code Here

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

  public static void main(String[] args) {
    AbstractApplicationContext context =
      new ClassPathXmlApplicationContext("/META-INF/spring/integration/cafeDemo-xml.xml", CafeDemoApp.class);

    Cafe cafe = (Cafe) context.getBean("cafe");
    for (int i = 1; i <= 100; i++) {
      Order order = new Order(i);
      order.addItem(DrinkType.LATTE, 2, false);
      order.addItem(DrinkType.MOCHA, 3, true);
      cafe.placeOrder(order);
    }
    context.close();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.