本文整理汇总了Java中org.apache.tomcat.util.digester.Digester.addSetNext方法的典型用法代码示例。如果您正苦于以下问题:Java Digester.addSetNext方法的具体用法?Java Digester.addSetNext怎么用?Java Digester.addSetNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.tomcat.util.digester.Digester
的用法示例。
在下文中一共展示了Digester.addSetNext方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createStopDigester
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* Create and configure the Digester we will be using for shutdown.
*/
protected Digester createStopDigester() {
// Initialize the digester
Digester digester = new Digester();
digester.setUseContextClassLoader(true);
// Configure the rules we need for shutting down
digester.addObjectCreate("Server",
"org.apache.catalina.core.StandardServer",
"className");
digester.addSetProperties("Server");
digester.addSetNext("Server",
"setServer",
"org.apache.catalina.Server");
return (digester);
}
示例2: createStopDigester
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* Create and configure the Digester we will be using for shutdown.
*/
protected Digester createStopDigester() {
// Initialize the digester
Digester digester = new Digester();
// Configure the rules we need for shutting down
digester.addObjectCreate("Server",
"org.apache.catalina.core.StandardServer",
"className");
digester.addSetProperties("Server");
digester.addSetNext("Server",
"setServer",
"org.apache.catalina.Server");
return (digester);
}
示例3: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* <p>Add the set of Rule instances defined in this RuleSet to the
* specified <code>Digester</code> instance, associating them with
* our namespace URI (if any). This method should only be called
* by a Digester instance.</p>
*
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Realm",
null, // MUST be specified in the element,
"className");
digester.addSetProperties(prefix + "Realm");
digester.addSetNext(prefix + "Realm",
"setRealm",
"org.apache.catalina.Realm");
digester.addObjectCreate(prefix + "Realm/Realm",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Realm/Realm");
digester.addSetNext(prefix + "Realm/Realm",
"addRealm",
"org.apache.catalina.Realm");
}
示例4: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* <p>Add the set of Rule instances defined in this RuleSet to the
* specified <code>Digester</code> instance, associating them with
* our namespace URI (if any). This method should only be called
* by a Digester instance.</p>
*
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
@Override
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Realm",
null, // MUST be specified in the element,
"className");
digester.addSetProperties(prefix + "Realm");
digester.addSetNext(prefix + "Realm",
"setRealm",
"org.apache.catalina.Realm");
digester.addObjectCreate(prefix + "Realm/Realm",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Realm/Realm");
digester.addSetNext(prefix + "Realm/Realm",
"addRealm",
"org.apache.catalina.Realm");
}
示例5: createStopDigester
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* Create and configure the Digester we will be using for shutdown.
*/
protected Digester createStopDigester() {
// Initialize the digester
Digester digester = new Digester();
digester.setUseContextClassLoader(true);
// Configure the rules we need for shutting down
digester.addObjectCreate("Server", "org.apache.catalina.core.StandardServer", "className");
digester.addSetProperties("Server");
digester.addSetNext("Server", "setServer", "org.apache.catalina.Server");
return (digester);
}
示例6: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* <p>
* Add the set of Rule instances defined in this RuleSet to the specified
* <code>Digester</code> instance, associating them with our namespace URI
* (if any). This method should only be called by a Digester instance.
* </p>
*
* @param digester
* Digester instance to which the new Rule instances should be
* added.
*/
@Override
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Host", "org.apache.catalina.core.StandardHost", "className");
digester.addSetProperties(prefix + "Host");
digester.addRule(prefix + "Host", new CopyParentClassLoaderRule());
digester.addRule(prefix + "Host",
new LifecycleListenerRule("org.apache.catalina.startup.HostConfig", "hostConfigClass"));
digester.addSetNext(prefix + "Host", "addChild", "org.apache.catalina.Container");
digester.addCallMethod(prefix + "Host/Alias", "addAlias", 0);
// Cluster configuration start
digester.addObjectCreate(prefix + "Host/Cluster", null, // MUST be
// specified in
// the element
"className");
digester.addSetProperties(prefix + "Host/Cluster");
digester.addSetNext(prefix + "Host/Cluster", "setCluster", "org.apache.catalina.Cluster");
// Cluster configuration end
digester.addObjectCreate(prefix + "Host/Listener", null, // MUST be
// specified
// in the
// element
"className");
digester.addSetProperties(prefix + "Host/Listener");
digester.addSetNext(prefix + "Host/Listener", "addLifecycleListener", "org.apache.catalina.LifecycleListener");
digester.addRuleSet(new RealmRuleSet(prefix + "Host/"));
digester.addObjectCreate(prefix + "Host/Valve", null, // MUST be
// specified in
// the element
"className");
digester.addSetProperties(prefix + "Host/Valve");
digester.addSetNext(prefix + "Host/Valve", "addValve", "org.apache.catalina.Valve");
}
示例7: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* <p>
* Add the set of Rule instances defined in this RuleSet to the specified
* <code>Digester</code> instance, associating them with our namespace URI
* (if any). This method should only be called by a Digester instance.
* </p>
*
* @param digester
* Digester instance to which the new Rule instances should be
* added.
*/
@Override
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Engine", "org.apache.catalina.core.StandardEngine", "className");
digester.addSetProperties(prefix + "Engine");
digester.addRule(prefix + "Engine",
new LifecycleListenerRule("org.apache.catalina.startup.EngineConfig", "engineConfigClass"));
digester.addSetNext(prefix + "Engine", "setContainer", "org.apache.catalina.Container");
// Cluster configuration start
digester.addObjectCreate(prefix + "Engine/Cluster", null, // MUST be
// specified
// in the
// element
"className");
digester.addSetProperties(prefix + "Engine/Cluster");
digester.addSetNext(prefix + "Engine/Cluster", "setCluster", "org.apache.catalina.Cluster");
// Cluster configuration end
digester.addObjectCreate(prefix + "Engine/Listener", null, // MUST be
// specified
// in the
// element
"className");
digester.addSetProperties(prefix + "Engine/Listener");
digester.addSetNext(prefix + "Engine/Listener", "addLifecycleListener",
"org.apache.catalina.LifecycleListener");
digester.addRuleSet(new RealmRuleSet(prefix + "Engine/"));
digester.addObjectCreate(prefix + "Engine/Valve", null, // MUST be
// specified in
// the element
"className");
digester.addSetProperties(prefix + "Engine/Valve");
digester.addSetNext(prefix + "Engine/Valve", "addValve", "org.apache.catalina.Valve");
}
示例8: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* <p>Add the set of Rule instances defined in this RuleSet to the
* specified <code>Digester</code> instance, associating them with
* our namespace URI (if any). This method should only be called
* by a Digester instance.</p>
*
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
@Override
public void addRuleInstances(Digester digester) {
String pattern = prefix;
for (int i = 0; i < MAX_NESTED_REALM_LEVELS; i++) {
if (i > 0) {
pattern += "/";
}
pattern += "Realm";
digester.addObjectCreate(pattern,
null, // MUST be specified in the element,
"className");
digester.addSetProperties(pattern);
if (i == 0) {
digester.addSetNext(pattern,
"setRealm",
"org.apache.catalina.Realm");
} else {
digester.addSetNext(pattern,
"addRealm",
"org.apache.catalina.Realm");
}
}
}
示例9: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* <p>Add the set of Rule instances defined in this RuleSet to the
* specified <code>Digester</code> instance, associating them with
* our namespace URI (if any). This method should only be called
* by a Digester instance.</p>
*
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
@Override
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Host",
"org.apache.catalina.core.StandardHost",
"className");
digester.addSetProperties(prefix + "Host");
digester.addRule(prefix + "Host",
new CopyParentClassLoaderRule());
digester.addRule(prefix + "Host",
new LifecycleListenerRule
("org.apache.catalina.startup.HostConfig",
"hostConfigClass"));
digester.addSetNext(prefix + "Host",
"addChild",
"org.apache.catalina.Container");
digester.addCallMethod(prefix + "Host/Alias",
"addAlias", 0);
//Cluster configuration start
digester.addObjectCreate(prefix + "Host/Cluster",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Host/Cluster");
digester.addSetNext(prefix + "Host/Cluster",
"setCluster",
"org.apache.catalina.Cluster");
//Cluster configuration end
digester.addObjectCreate(prefix + "Host/Listener",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Host/Listener");
digester.addSetNext(prefix + "Host/Listener",
"addLifecycleListener",
"org.apache.catalina.LifecycleListener");
digester.addRuleSet(new RealmRuleSet(prefix + "Host/"));
digester.addObjectCreate(prefix + "Host/Valve",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Host/Valve");
digester.addSetNext(prefix + "Host/Valve",
"addValve",
"org.apache.catalina.Valve");
}
示例10: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* <p>Add the set of Rule instances defined in this RuleSet to the
* specified <code>Digester</code> instance, associating them with
* our namespace URI (if any). This method should only be called
* by a Digester instance.</p>
*
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
@Override
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Engine",
"org.apache.catalina.core.StandardEngine",
"className");
digester.addSetProperties(prefix + "Engine");
digester.addRule(prefix + "Engine",
new LifecycleListenerRule
("org.apache.catalina.startup.EngineConfig",
"engineConfigClass"));
digester.addSetNext(prefix + "Engine",
"setContainer",
"org.apache.catalina.Container");
//Cluster configuration start
digester.addObjectCreate(prefix + "Engine/Cluster",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Engine/Cluster");
digester.addSetNext(prefix + "Engine/Cluster",
"setCluster",
"org.apache.catalina.Cluster");
//Cluster configuration end
digester.addObjectCreate(prefix + "Engine/Listener",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Engine/Listener");
digester.addSetNext(prefix + "Engine/Listener",
"addLifecycleListener",
"org.apache.catalina.LifecycleListener");
digester.addRuleSet(new RealmRuleSet(prefix + "Engine/"));
digester.addObjectCreate(prefix + "Engine/Valve",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Engine/Valve");
digester.addSetNext(prefix + "Engine/Valve",
"addValve",
"org.apache.catalina.Valve");
}
示例11: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
private void addRuleInstances(Digester digester, String pattern, String methodName) {
digester.addObjectCreate(pattern, null /* MUST be specified in the element */,
"className");
digester.addSetProperties(pattern);
digester.addSetNext(pattern, methodName, "org.apache.catalina.Realm");
}
示例12: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* <p>Add the set of Rule instances defined in this RuleSet to the
* specified <code>Digester</code> instance, associating them with
* our namespace URI (if any). This method should only be called
* by a Digester instance.</p>
*
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Host",
"org.apache.catalina.core.StandardHost",
"className");
digester.addSetProperties(prefix + "Host");
digester.addRule(prefix + "Host",
new CopyParentClassLoaderRule());
digester.addRule(prefix + "Host",
new LifecycleListenerRule
("org.apache.catalina.startup.HostConfig",
"hostConfigClass"));
digester.addSetNext(prefix + "Host",
"addChild",
"org.apache.catalina.Container");
digester.addCallMethod(prefix + "Host/Alias",
"addAlias", 0);
//Cluster configuration start
digester.addObjectCreate(prefix + "Host/Cluster",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Host/Cluster");
digester.addSetNext(prefix + "Host/Cluster",
"setCluster",
"org.apache.catalina.Cluster");
//Cluster configuration end
digester.addObjectCreate(prefix + "Host/Listener",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Host/Listener");
digester.addSetNext(prefix + "Host/Listener",
"addLifecycleListener",
"org.apache.catalina.LifecycleListener");
digester.addRuleSet(new RealmRuleSet(prefix + "Host/"));
digester.addObjectCreate(prefix + "Host/Valve",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Host/Valve");
digester.addSetNext(prefix + "Host/Valve",
"addValve",
"org.apache.catalina.Valve");
}
示例13: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* <p>Add the set of Rule instances defined in this RuleSet to the
* specified <code>Digester</code> instance, associating them with
* our namespace URI (if any). This method should only be called
* by a Digester instance.</p>
*
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Engine",
"org.apache.catalina.core.StandardEngine",
"className");
digester.addSetProperties(prefix + "Engine");
digester.addRule(prefix + "Engine",
new LifecycleListenerRule
("org.apache.catalina.startup.EngineConfig",
"engineConfigClass"));
digester.addSetNext(prefix + "Engine",
"setContainer",
"org.apache.catalina.Container");
//Cluster configuration start
digester.addObjectCreate(prefix + "Engine/Cluster",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Engine/Cluster");
digester.addSetNext(prefix + "Engine/Cluster",
"setCluster",
"org.apache.catalina.Cluster");
//Cluster configuration end
digester.addObjectCreate(prefix + "Engine/Listener",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Engine/Listener");
digester.addSetNext(prefix + "Engine/Listener",
"addLifecycleListener",
"org.apache.catalina.LifecycleListener");
digester.addRuleSet(new RealmRuleSet(prefix + "Engine/"));
digester.addObjectCreate(prefix + "Engine/Valve",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Engine/Valve");
digester.addSetNext(prefix + "Engine/Valve",
"addValve",
"org.apache.catalina.Valve");
}
示例14: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
* <p>Add the set of Rule instances defined in this RuleSet to the
* specified <code>Digester</code> instance, associating them with
* our namespace URI (if any). This method should only be called
* by a Digester instance.</p>
*
* @param digester Digester instance to which the new Rule instances
* should be added.
*/
@Override
public void addRuleInstances(Digester digester) {
digester.addObjectCreate(prefix + "Engine",
"org.apache.catalina.core.StandardEngine",
"className");
digester.addSetProperties(prefix + "Engine");
// 为Engine增加生命周期监听 例如调用start()方法 如果不了解这一点 可能会找不到代码调用的地方
// LifecycleListenerRule 本身也是一个解析规则Rule 继续进去看
digester.addRule(prefix + "Engine",
new LifecycleListenerRule
("org.apache.catalina.startup.EngineConfig",
"engineConfigClass"));
//容器是从Engine阶段开始算的 Server Service并不算作容器的一部分
digester.addSetNext(prefix + "Engine",
"setContainer",
"org.apache.catalina.Container");
//TODO Cluster configuration start
digester.addObjectCreate(prefix + "Engine/Cluster",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Engine/Cluster");
digester.addSetNext(prefix + "Engine/Cluster",
"setCluster",
"org.apache.catalina.Cluster");
//Cluster configuration end
digester.addObjectCreate(prefix + "Engine/Listener",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Engine/Listener");
digester.addSetNext(prefix + "Engine/Listener",
"addLifecycleListener",
"org.apache.catalina.LifecycleListener");
digester.addRuleSet(new RealmRuleSet(prefix + "Engine/"));
digester.addObjectCreate(prefix + "Engine/Valve",
null, // MUST be specified in the element
"className");
digester.addSetProperties(prefix + "Engine/Valve");
digester.addSetNext(prefix + "Engine/Valve",
"addValve",
"org.apache.catalina.Valve");
}
示例15: addRuleInstances
import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
private void addRuleInstances(Digester digester, String pattern, String methodName) {
digester.addObjectCreate(pattern,
null /* MUST be specified in the element */, "className");
digester.addSetProperties(pattern);
digester.addSetNext(pattern, methodName, "org.apache.catalina.Realm");
}