org.apache.catalina.Context.getContainerSciFilter()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中org.apache.catalina.Context.getContainerSciFilter()方法的一些代码示例,展示了Context.getContainerSciFilter()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.getContainerSciFilter()方法的具体详情如下:
包路径:org.apache.catalina.Context
类名称:Context
方法名:getContainerSciFilter

Context.getContainerSciFilter介绍

[英]Obtains the regular expression that specifies which container provided SCIs should be filtered out and not used for this context. Matching uses java.util.regex.Matcher#find() so the regular expression only has to match a sub-string of the fully qualified class name of the container provided SCI for it to be filtered out.
[中]获取正则表达式,该表达式指定应筛选出哪个容器提供的SCI,并且不用于此上下文。匹配使用java。util。正则表达式。Matcher#find(),因此正则表达式只需匹配所提供容器的完全限定类名的子字符串,即可将其过滤掉。

代码示例

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

/**
 * Construct a loader to load services from a ServletContext.
 *
 * @param context the context to use
 */
public WebappServiceLoader(Context context) {
  this.context = context;
  this.servletContext = context.getServletContext();
  String containerSciFilter = context.getContainerSciFilter();
  if (containerSciFilter != null && containerSciFilter.length() > 0) {
    containerSciFilterPattern = Pattern.compile(containerSciFilter);
  } else {
    containerSciFilterPattern = null;
  }
}

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Construct a loader to load services from a ServletContext.
 *
 * @param context the context to use
 */
public WebappServiceLoader(Context context) {
  this.context = context;
  this.servletContext = context.getServletContext();
  String containerSciFilter = context.getContainerSciFilter();
  if (containerSciFilter != null && containerSciFilter.length() > 0) {
    containerSciFilterPattern = Pattern.compile(containerSciFilter);
  } else {
    containerSciFilterPattern = null;
  }
}

相关文章

微信公众号

最新文章

更多

Context类方法