1 17 18 19 package org.apache.catalina.startup; 20 21 22 import org.apache.tomcat.util.digester.Digester; 23 import org.apache.tomcat.util.digester.RuleSetBase; 24 25 26 36 37 public class EngineRuleSet extends RuleSetBase { 38 39 40 42 43 46 protected String prefix = null; 47 48 49 51 52 56 public EngineRuleSet() { 57 58 this(""); 59 60 } 61 62 63 70 public EngineRuleSet(String prefix) { 71 72 super(); 73 this.namespaceURI = null; 74 this.prefix = prefix; 75 76 } 77 78 79 81 82 91 public void addRuleInstances(Digester digester) { 92 93 digester.addObjectCreate(prefix + "Engine", 94 "org.apache.catalina.core.StandardEngine", 95 "className"); 96 digester.addSetProperties(prefix + "Engine"); 97 digester.addRule(prefix + "Engine", 98 new LifecycleListenerRule 99 ("org.apache.catalina.startup.EngineConfig", 100 "engineConfigClass")); 101 digester.addSetNext(prefix + "Engine", 102 "setContainer", 103 "org.apache.catalina.Container"); 104 105 digester.addObjectCreate(prefix + "Engine/Cluster", 107 null, "className"); 109 digester.addSetProperties(prefix + "Engine/Cluster"); 110 digester.addSetNext(prefix + "Engine/Cluster", 111 "setCluster", 112 "org.apache.catalina.Cluster"); 113 115 digester.addObjectCreate(prefix + "Engine/Listener", 116 null, "className"); 118 digester.addSetProperties(prefix + "Engine/Listener"); 119 digester.addSetNext(prefix + "Engine/Listener", 120 "addLifecycleListener", 121 "org.apache.catalina.LifecycleListener"); 122 123 124 digester.addObjectCreate(prefix + "Engine/Realm", 125 null, "className"); 127 digester.addSetProperties(prefix + "Engine/Realm"); 128 digester.addSetNext(prefix + "Engine/Realm", 129 "setRealm", 130 "org.apache.catalina.Realm"); 131 132 digester.addObjectCreate(prefix + "Engine/Valve", 133 null, "className"); 135 digester.addSetProperties(prefix + "Engine/Valve"); 136 digester.addSetNext(prefix + "Engine/Valve", 137 "addValve", 138 "org.apache.catalina.Valve"); 139 140 } 141 142 143 } 144 | Popular Tags |