本文整理了Java中org.apache.catalina.Loader.getContext()
方法的一些代码示例,展示了Loader.getContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Loader.getContext()
方法的具体详情如下:
包路径:org.apache.catalina.Loader
类名称:Loader
方法名:getContext
[英]Return the Context with which this Loader has been associated.
[中]返回与此加载程序关联的上下文。
代码示例来源:origin: org.apache.tomee/tomee-catalina
@Override
public Context getContext() {
return delegate.getContext();
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* Create an <code>ObjectName</code> for this
* <code>Loader</code> object.
*
* @param domain Domain in which this name is to be created
* @param loader The Loader to be named
* @return a new object name
* @exception MalformedObjectNameException if a name cannot be created
*/
static ObjectName createObjectName(String domain, Loader loader)
throws MalformedObjectNameException {
ObjectName name = null;
Context context = loader.getContext();
ContextName cn = new ContextName(context.getName(), false);
Container host = context.getParent();
name = new ObjectName(domain + ":type=Loader,host=" + host.getName() +
",context=" + cn.getDisplayName());
return name;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* Create an <code>ObjectName</code> for this
* <code>Loader</code> object.
*
* @param domain Domain in which this name is to be created
* @param loader The Loader to be named
* @return a new object name
* @exception MalformedObjectNameException if a name cannot be created
*/
static ObjectName createObjectName(String domain, Loader loader)
throws MalformedObjectNameException {
ObjectName name = null;
Context context = loader.getContext();
ContextName cn = new ContextName(context.getName(), false);
Container host = context.getParent();
name = new ObjectName(domain + ":type=Loader,host=" + host.getName() +
",context=" + cn.getDisplayName());
return name;
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Create an <code>ObjectName</code> for this
* <code>Loader</code> object.
*
* @param domain Domain in which this name is to be created
* @param loader The Loader to be named
*
* @exception MalformedObjectNameException if a name cannot be created
*/
static ObjectName createObjectName(String domain, Loader loader)
throws MalformedObjectNameException {
ObjectName name = null;
Context context = loader.getContext();
ContextName cn = new ContextName(context.getName());
Container host = context.getParent();
name = new ObjectName(domain + ":type=Loader,host=" + host.getName() +
",context=" + cn.getDisplayName());
return name;
}
内容来源于网络,如有侵权,请联系作者删除!