Package org.huihoo.willow.util

Examples of org.huihoo.willow.util.WillowDigester


   */
  protected Digester createStartDigester()
  {
    long t1 = System.currentTimeMillis();
    // Initialize the digester
    Digester digester = new WillowDigester();
    if (debug > 0)
    {
      digester.setDebug(debug);
    }
    digester.setValidating(false);
    digester.setClassLoader(StandardServer.class.getClassLoader());

    // Configure the actions we will be using
    digester.addObjectCreate("Server", "org.huihoo.willow.core.StandardServer", "className");
    digester.addSetProperties("Server");
    digester.addSetNext("Server", "setServer", "org.huihoo.willow.Server");

    digester.addObjectCreate("Server/Listener", null, // MUST be specified in the element
    "className");
    digester.addSetProperties("Server/Listener");
    digester.addSetNext(
      "Server/Listener",
      "addLifecycleListener",
      "org.huihoo.willow.LifecycleListener");

    digester.addObjectCreate(
      "Server/Service",
      "org.huihoo.willow.core.StandardService",
      "className");
    digester.addSetProperties("Server/Service");
    digester.addSetNext("Server/Service", "addService", "org.huihoo.willow.Service");

    digester.addObjectCreate("Server/Service/Listener", null, // MUST be specified in the element
    "className");
    digester.addSetProperties("Server/Service/Listener");
    digester.addSetNext(
      "Server/Service/Listener",
      "addLifecycleListener",
      "org.huihoo.willow.LifecycleListener");
   
    digester.addObjectCreate(
      "Server/Service/NamingServer",
      "org.huihoo.willow.core.StandardNamingServer",
      "className");
    digester.addRule("Server/Service/NamingServer", new SetAllPropertiesRule());
    digester.addSetNext(
      "Server/Service/NamingServer",
      "setNamingServer",
      "org.huihoo.willow.NamingServer");
           
    // Add RuleSets for nested elements   
    digester.addRuleSet(new EngineRuleSet("Server/Service/"));
    digester.addRuleSet(new ContextRuleSet("Server/Service/Engine/"));

    // When the 'engine' is found, set the parentClassLoader.
    digester.addRule(
      "Server/Service/Engine",
      new SetParentClassLoaderRule(digester, parentClassLoader));
     
    long t2 = System.currentTimeMillis();
    log.debug("Digester for server.xml created " + (t2 - t1));
View Full Code Here


   */
  protected Digester createDigester()
  {
    if (digester == null)
    {
      digester = new WillowDigester();
      if (engine.getDebug() > 0)
      {
        digester.setDebug(3);
      }
      digester.setValidating(false);
View Full Code Here

TOP

Related Classes of org.huihoo.willow.util.WillowDigester

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.