Package org.jostraca.process

Examples of org.jostraca.process.TemplateHandler


    TemplateHandlerManager thm  = new TemplateHandlerManager( "Parser" );
    BasicTemplate          tm01 = new BasicTemplate();
    tm01.getPropertySet(Service.CONF_template)
      .set( TemplateHandlerManager.PROPERTY_PREFIX+"Parser", "org.jostraca.process.test.TestParser" );
   
    TemplateHandler th = thm.getTemplateHandler( tm01 );
    assertTrue( th instanceof TestParser );
    TestParser tp = (TestParser) th;
   
    th.process( tm01 );
    assertEquals( "TestParser:new, process:[Template[p:[]]], ", tp.toString() );

    th.complete( ListUtil.make( tm01 ) );
    assertEquals( "TestParser:new, process:[Template[p:[]]], complete:[[Template[p:[]]]], ", tp.toString() );
  }
View Full Code Here


    TestProcessStage tps = new TestProcessStage();
    tps.setUserMessageHandler( new CommandLineUserMessageHandler() );
    tps.process( tmlist );

    TemplateHandlerManager thm = tps.getTemplateHandlerManager();
    TemplateHandler th = thm.getTemplateHandler( tm01 );
    assertTrue( th instanceof TestParser );
    TestParser tp = (TestParser) th;
   
    assertEquals( "TestParser:new, process:[Template[p:tm01[]]], process:[Template[p:tm02[]]], complete:[[Template[p:tm01[]], Template[p:tm02[]]]], ", tp.toString() );
View Full Code Here

TOP

Related Classes of org.jostraca.process.TemplateHandler

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.