Package org.springframework.integration.samples.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


   *
   * @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

   * 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

  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

  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

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

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.