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 35 36 public class HostRuleSet extends RuleSetBase { 37 38 39 41 42 45 protected String prefix = null; 46 47 48 50 51 55 public HostRuleSet() { 56 57 this(""); 58 59 } 60 61 62 69 public HostRuleSet(String prefix) { 70 71 super(); 72 this.namespaceURI = null; 73 this.prefix = prefix; 74 75 } 76 77 78 80 81 90 public void addRuleInstances(Digester digester) { 91 92 digester.addObjectCreate(prefix + "Host", 93 "org.apache.catalina.core.StandardHost", 94 "className"); 95 digester.addSetProperties(prefix + "Host"); 96 digester.addRule(prefix + "Host", 97 new CopyParentClassLoaderRule()); 98 digester.addRule(prefix + "Host", 99 new LifecycleListenerRule 100 ("org.apache.catalina.startup.HostConfig", 101 "hostConfigClass")); 102 digester.addSetNext(prefix + "Host", 103 "addChild", 104 "org.apache.catalina.Container"); 105 106 digester.addCallMethod(prefix + "Host/Alias", 107 "addAlias", 0); 108 109 digester.addObjectCreate(prefix + "Host/Cluster", 111 null, "className"); 113 digester.addSetProperties(prefix + "Host/Cluster"); 114 digester.addSetNext(prefix + "Host/Cluster", 115 "setCluster", 116 "org.apache.catalina.Cluster"); 117 119 digester.addObjectCreate(prefix + "Host/Listener", 120 null, "className"); 122 digester.addSetProperties(prefix + "Host/Listener"); 123 digester.addSetNext(prefix + "Host/Listener", 124 "addLifecycleListener", 125 "org.apache.catalina.LifecycleListener"); 126 127 digester.addObjectCreate(prefix + "Host/Realm", 128 null, "className"); 130 digester.addSetProperties(prefix + "Host/Realm"); 131 digester.addSetNext(prefix + "Host/Realm", 132 "setRealm", 133 "org.apache.catalina.Realm"); 134 135 digester.addObjectCreate(prefix + "Host/Valve", 136 null, "className"); 138 digester.addSetProperties(prefix + "Host/Valve"); 139 digester.addSetNext(prefix + "Host/Valve", 140 "addValve", 141 "org.apache.catalina.Valve"); 142 143 } 144 145 146 } 147 | Popular Tags |