org.apache.catalina.connector.Request.notifyAttributeRemoved()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(120)

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

Request.notifyAttributeRemoved介绍

[英]Notify interested listeners that attribute has been removed.
[中]通知感兴趣的侦听器属性已被删除。

代码示例

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

/**
 * Remove the specified request attribute if it exists.
 *
 * @param name Name of the request attribute to remove
 */
@Override
public void removeAttribute(String name) {
  // Remove the specified attribute
  // Pass special attributes to the native layer
  if (name.startsWith("org.apache.tomcat.")) {
    coyoteRequest.getAttributes().remove(name);
  }
  boolean found = attributes.containsKey(name);
  if (found) {
    Object value = attributes.get(name);
    attributes.remove(name);
    // Notify interested application event listeners
    notifyAttributeRemoved(name, value);
  }
}

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

/**
 * Remove the specified request attribute if it exists.
 *
 * @param name Name of the request attribute to remove
 */
@Override
public void removeAttribute(String name) {
  // Remove the specified attribute
  // Pass special attributes to the native layer
  if (name.startsWith("org.apache.tomcat.")) {
    coyoteRequest.getAttributes().remove(name);
  }
  boolean found = attributes.containsKey(name);
  if (found) {
    Object value = attributes.get(name);
    attributes.remove(name);
    // Notify interested application event listeners
    notifyAttributeRemoved(name, value);
  }
}

代码示例来源:origin: codefollower/Tomcat-Research

/**
 * Remove the specified request attribute if it exists.
 *
 * @param name Name of the request attribute to remove
 */
@Override
public void removeAttribute(String name) {
  // Remove the specified attribute
  // Check for read only attribute
  // requests are per thread so synchronization unnecessary
  if (readOnlyAttributes.containsKey(name)) {
    return;
  }
  // Pass special attributes to the native layer
  if (name.startsWith("org.apache.tomcat.")) {
    coyoteRequest.getAttributes().remove(name);
  }
  boolean found = attributes.containsKey(name);
  if (found) {
    Object value = attributes.get(name);
    attributes.remove(name);
    // Notify interested application event listeners
    notifyAttributeRemoved(name, value);
  } else {
    return;
  }
}

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

/**
 * Remove the specified request attribute if it exists.
 *
 * @param name Name of the request attribute to remove
 */
@Override
public void removeAttribute(String name) {
  // Remove the specified attribute
  // Check for read only attribute
  // requests are per thread so synchronization unnecessary
  if (readOnlyAttributes.containsKey(name)) {
    return;
  }
  // Pass special attributes to the native layer
  if (name.startsWith("org.apache.tomcat.")) {
    coyoteRequest.getAttributes().remove(name);
  }
  boolean found = attributes.containsKey(name);
  if (found) {
    Object value = attributes.get(name);
    attributes.remove(name);
    // Notify interested application event listeners
    notifyAttributeRemoved(name, value);
  } else {
    return;
  }
}

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

/**
 * Remove the specified request attribute if it exists.
 *
 * @param name Name of the request attribute to remove
 */
@Override
public void removeAttribute(String name) {
  // Remove the specified attribute
  // Check for read only attribute
  // requests are per thread so synchronization unnecessary
  if (readOnlyAttributes.containsKey(name)) {
    return;
  }
  // Pass special attributes to the native layer
  if (name.startsWith("org.apache.tomcat.")) {
    coyoteRequest.getAttributes().remove(name);
  }
  boolean found = attributes.containsKey(name);
  if (found) {
    Object value = attributes.get(name);
    attributes.remove(name);
    // Notify interested application event listeners
    notifyAttributeRemoved(name, value);
  } else {
    return;
  }
}

相关文章

Request类方法