当前位置: 首页>>代码示例>>Java>>正文


Java Util.objectNameValueNeedsQuote方法代码示例

本文整理汇总了Java中org.apache.tomcat.util.modeler.Util.objectNameValueNeedsQuote方法的典型用法代码示例。如果您正苦于以下问题:Java Util.objectNameValueNeedsQuote方法的具体用法?Java Util.objectNameValueNeedsQuote怎么用?Java Util.objectNameValueNeedsQuote使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tomcat.util.modeler.Util的用法示例。


在下文中一共展示了Util.objectNameValueNeedsQuote方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getObjectNameKeyProperties

import org.apache.tomcat.util.modeler.Util; //导入方法依赖的package包/类
@Override
protected String getObjectNameKeyProperties() {

    StringBuilder keyProperties =
        new StringBuilder("j2eeType=Servlet,name=");
    
    String name = getName();
    if (Util.objectNameValueNeedsQuote(name)) {
        name = ObjectName.quote(name);
    }
    keyProperties.append(name);
    
    keyProperties.append(getWebModuleKeyProperties());

    return keyProperties.toString();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:17,代码来源:StandardWrapper.java

示例2: registerJMX

import org.apache.tomcat.util.modeler.Util; //导入方法依赖的package包/类
private void registerJMX() {
    String parentName = context.getName();
    if (!parentName.startsWith("/")) {
        parentName = "/" + parentName;
    }

    String hostName = context.getParent().getName();
    hostName = (hostName == null) ? "DEFAULT" : hostName;

    // domain == engine name
    String domain = context.getParent().getParent().getName();

    String webMod = "//" + hostName + parentName;
    String onameStr = null;
    String filterName = filterDef.getFilterName();
    if (Util.objectNameValueNeedsQuote(filterName)) {
        filterName = ObjectName.quote(filterName);
    }
    if (context instanceof StandardContext) {
        StandardContext standardContext = (StandardContext) context;
        onameStr = domain + ":j2eeType=Filter,name=" + filterName +
             ",WebModule=" + webMod + ",J2EEApplication=" +
             standardContext.getJ2EEApplication() + ",J2EEServer=" +
             standardContext.getJ2EEServer();
    } else {
        onameStr = domain + ":j2eeType=Filter,name=" + filterName +
             ",WebModule=" + webMod;
    }
    try {
        oname = new ObjectName(onameStr);
        Registry.getRegistry(null, null).registerComponent(this, oname,
                null);
    } catch (Exception ex) {
        log.info(sm.getString("applicationFilterConfig.jmxRegisterFail",
                getFilterClass(), getFilterName()), ex);
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:38,代码来源:ApplicationFilterConfig.java

示例3: getObjectNameKeyProperties

import org.apache.tomcat.util.modeler.Util; //导入方法依赖的package包/类
@Override
protected String getObjectNameKeyProperties() {

	StringBuilder keyProperties = new StringBuilder("j2eeType=Servlet,name=");

	String name = getName();
	if (Util.objectNameValueNeedsQuote(name)) {
		name = ObjectName.quote(name);
	}
	keyProperties.append(name);

	keyProperties.append(getWebModuleKeyProperties());

	return keyProperties.toString();
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:16,代码来源:StandardWrapper.java

示例4: registerJMX

import org.apache.tomcat.util.modeler.Util; //导入方法依赖的package包/类
private void registerJMX() {
	String parentName = context.getName();
	if (!parentName.startsWith("/")) {
		parentName = "/" + parentName;
	}

	String hostName = context.getParent().getName();
	hostName = (hostName == null) ? "DEFAULT" : hostName;

	// domain == engine name
	String domain = context.getParent().getParent().getName();

	String webMod = "//" + hostName + parentName;
	String onameStr = null;
	String filterName = filterDef.getFilterName();
	if (Util.objectNameValueNeedsQuote(filterName)) {
		filterName = ObjectName.quote(filterName);
	}
	if (context instanceof StandardContext) {
		StandardContext standardContext = (StandardContext) context;
		onameStr = domain + ":j2eeType=Filter,name=" + filterName + ",WebModule=" + webMod + ",J2EEApplication="
				+ standardContext.getJ2EEApplication() + ",J2EEServer=" + standardContext.getJ2EEServer();
	} else {
		onameStr = domain + ":j2eeType=Filter,name=" + filterName + ",WebModule=" + webMod;
	}
	try {
		oname = new ObjectName(onameStr);
		Registry.getRegistry(null, null).registerComponent(this, oname, null);
	} catch (Exception ex) {
		log.info(sm.getString("applicationFilterConfig.jmxRegisterFail", getFilterClass(), getFilterName()), ex);
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:33,代码来源:ApplicationFilterConfig.java


注:本文中的org.apache.tomcat.util.modeler.Util.objectNameValueNeedsQuote方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。