org.apache.catalina.core.ApplicationContext.mergeParameters()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.2k)|赞(0)|评价(0)|浏览(106)

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

ApplicationContext.mergeParameters介绍

[英]Merge the context initialization parameters specified in the application deployment descriptor with the application parameters described in the server configuration, respecting the override property of the application parameters appropriately.
[中]根据应用程序参数的override属性,将应用程序部署描述符中指定的上下文初始化参数与服务器配置中描述的应用程序参数合并。

代码示例

代码示例来源:origin: jboss.web/jbossweb

/**
 * Return the value of the specified initialization parameter, or
 * <code>null</code> if this parameter does not exist.
 *
 * @param name Name of the initialization parameter to retrieve
 */
public String getInitParameter(final String name) {
  mergeParameters();
  return ((String) parameters.get(name));
}

代码示例来源:origin: tomcat/catalina

/**
 * Return the value of the specified initialization parameter, or
 * <code>null</code> if this parameter does not exist.
 *
 * @param name Name of the initialization parameter to retrieve
 */
public String getInitParameter(final String name) {
  mergeParameters();
  synchronized (parameters) {
    return ((String) parameters.get(name));
  }
}

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Return the value of the specified initialization parameter, or
 * <code>null</code> if this parameter does not exist.
 *
 * @param name Name of the initialization parameter to retrieve
 */
public String getInitParameter(final String name) {
  mergeParameters();
  return ((String) parameters.get(name));
}

代码示例来源:origin: tomcat/catalina

/**
 * Return the names of the context's initialization parameters, or an
 * empty enumeration if the context has no initialization parameters.
 */
public Enumeration getInitParameterNames() {
  mergeParameters();
  synchronized (parameters) {
    return (new Enumerator(parameters.keySet()));
  }
}

代码示例来源:origin: org.jboss.web/jbossweb

/**
 * Return the names of the context's initialization parameters, or an
 * empty enumeration if the context has no initialization parameters.
 */
public Enumeration getInitParameterNames() {
  mergeParameters();
  return (new Enumerator(parameters.keySet()));
}

代码示例来源:origin: jboss.web/jbossweb

/**
 * Return the names of the context's initialization parameters, or an
 * empty enumeration if the context has no initialization parameters.
 */
public Enumeration getInitParameterNames() {
  mergeParameters();
  return (new Enumerator(parameters.keySet()));
}

代码示例来源:origin: jboss.web/jbossweb

public boolean setInitParameter(String name, String value) {
  if (restricted) {
    throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
  }
  if (!context.isStarting()) {
    throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
            getContextPath()));
  }
  mergeParameters();
  if (parameters.get(name) != null) {
    return false;
  } else {
    parameters.put(name, value);
    return true;
  }
}

代码示例来源:origin: org.jboss.web/jbossweb

public boolean setInitParameter(String name, String value) {
  if (restricted) {
    throw MESSAGES.restrictedListenerCannotCallMethod();
  }
  if (!context.isStarting()) {
    throw MESSAGES.contextAlreadyInitialized(getContextPath());
  }
  mergeParameters();
  if (parameters.get(name) != null) {
    return false;
  } else {
    parameters.put(name, value);
    return true;
  }
}

相关文章

微信公众号

最新文章

更多

ApplicationContext类方法