Package org.soybeanMilk.core

Examples of org.soybeanMilk.core.Executor


  public static void main(String[] args) throws Exception
  {
    Configuration cfg=new ConfigurationParser().parse(
        "example/"+Constants.DEFAULT_CONFIG_FILE);
   
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource();
   
    os.set("helloTo", "mars");
    os.set("helloRepeat", 3);
   
    printDiv();
    executor.execute("helloActionXml", os);
   
    printDiv();
    executor.execute("helloActionStatement", os);
   
    printDiv();
    executor.execute("testJavaSyntax", os);
   
    printDiv();
    executor.execute("testAfterBefore", os);
   
    printDiv();
    executor.execute("testException", os);
   
    printDiv();
    executor.execute("", os);
   
    printDiv();
    executor.execute("testRefToEmptyNameAction", os);
  }
View Full Code Here


  public static void main(String[] args) throws Exception
  {
    Configuration cfg=new ConfigurationParser().parse(
        "example/"+Constants.DEFAULT_CONFIG_FILE);
   
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource();
   
    os.set("helloTo", "friend");
    os.set("helloRepeat", 3);
   
    os.set("genericStringInput", "11");
    os.set("genericStringArrayInput", new String[]{"11", "22", "33"});
   
    printDiv();
    executor.execute("helloXml", os);
   
    printDiv();
    executor.execute("helloStatement", os);
   
    printDiv();
    executor.execute("javaSyntax", os);

    printDiv();
    executor.execute("reference", os);
   
    printDiv();
    executor.execute("interceptorBeforeAfter", os);
   
    printDiv();
    executor.execute("interceptorException", os);
   
    printDiv();
    executor.execute("genericSimple", os);
   
    printDiv();
    executor.execute("genericList", os);
   
    printDiv();
    executor.execute("genericSet", os);
   
    printDiv();
    executor.execute("genericArray", os);
   
    System.in.read();
  }
View Full Code Here

        "org/soybeanMilk/example/"+Constants.DEFAULT_CONFIG_FILE);
   
    DefaultResolverObjectFactory drof=(DefaultResolverObjectFactory)cfg.getResolverObjectFactory();
    drof.setExternalResolverObjectFactory(new SpringBeanFactory());
   
    Executor executor=new DefaultExecutor(cfg);
   
    ObjectSource os = new HashMapObjectSource();
   
    os.set("helloTo", "friend");
    os.set("helloRepeat", 3);
   
    os.set("genericStringInput", "11");
    os.set("genericStringArrayInput", new String[]{"11", "22", "33"});
   
    printDiv();
    executor.execute("helloXml", os);
   
    printDiv();
    executor.execute("helloStatement", os);
   
    printDiv();
    executor.execute("literals", os);
   
    printDiv();
    os.set("dynamicResolver", new DynamicResolver());
    executor.execute("dynamicResolver", os);
   
    printDiv();
    executor.execute("reference", os);
   
    printDiv();
    executor.execute("externalIocResolver", os);
   
    printDiv();
    executor.execute("interceptorBeforeAfter", os);
   
    printDiv();
    executor.execute("interceptorException", os);
   
    printDiv();
    executor.execute("genericSimple", os);
   
    printDiv();
    executor.execute("genericList", os);
   
    printDiv();
    executor.execute("genericSet", os);
   
    printDiv();
    executor.execute("genericArray", os);
   
    System.in.read();
  }
View Full Code Here

    }
   
    cfg.addExecutable(action);
   
    //创建执行器
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource(new DefaultGenericConverter());
   
    //设置参数
    os.set(argKey_hello_to, "mars");
    os.set(argKey_hello_repeat, 3);
   
    //执行
    executor.execute(actionName, os);
  }
View Full Code Here

  public static void main(String[] args) throws Exception
  {
    Configuration cfg=new ConfigurationParser().parse(
        "example/"+Constants.DEFAULT_CONFIG_FILE);
   
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource();
   
    os.set("helloTo", "mars");
    os.set("helloRepeat", 3);
   
    printDiv();
    executor.execute("helloActionXml", os);
   
    printDiv();
    executor.execute("helloActionStatement", os);
   
    printDiv();
    executor.execute("testJavaSyntax", os);
   
    printDiv();
    executor.execute("testAfterBefore", os);
   
    printDiv();
    executor.execute("testException", os);
  }
View Full Code Here

{
  public static void main(String[] args) throws Exception
  {
    Configuration cfg=new ConfigurationParser().parse("example/"+Constants.DEFAULT_CONFIG_FILE);
   
    Executor executor=new DefaultExecutor(cfg);
   
    ConvertableObjectSource os = new HashMapObjectSource();
   
    os.set("helloTo", "mars");
    os.set("helloRepeat", 3);
   
    executor.execute("helloAction", os);
  }
View Full Code Here

TOP

Related Classes of org.soybeanMilk.core.Executor

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.