本文整理汇总了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();
}
示例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);
}
}
示例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();
}
示例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);
}
}