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

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

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

Request.getAttributeNames介绍

[英]Return the names of all request attributes for this Request, or an empty Enumeration if there are none. Note that the attribute names returned will only be those for the attributes set via #setAttribute(String,Object). Tomcat internal attributes will not be included although they are accessible via #getAttribute(String). The Tomcat internal attributes include:

  • Globals#DISPATCHER_TYPE_ATTR

  • Globals#DISPATCHER_REQUEST_PATH_ATTR

  • Globals#ASYNC_SUPPORTED_ATTR

  • Globals#CERTIFICATES_ATTR (SSL connections only)

  • Globals#CIPHER_SUITE_ATTR (SSL connections only)

  • Globals#KEY_SIZE_ATTR (SSL connections only)

  • Globals#SSL_SESSION_ID_ATTR (SSL connections only)

  • Globals#SSL_SESSION_MGR_ATTR (SSL connections only)

  • Globals#PARAMETER_PARSE_FAILED_ATTR
    The underlying connector may also expose request attributes. These all have names starting with "org.apache.tomcat" and include:

  • Globals#SENDFILE_SUPPORTED_ATTR

  • Globals#COMET_SUPPORTED_ATTR

  • Globals#COMET_TIMEOUT_SUPPORTED_ATTR
    Connector implementations may return some, all or none of these attributes and may also support additional attributes.
    [中]返回此请求的所有请求属性的名称,如果没有,则返回空Enumeration。请注意,返回的属性名称将仅为通过#setAttribute(字符串,对象)设置的属性的名称。Tomcat内部属性将不包括在内,尽管它们可以通过#getAttribute(String)访问。Tomcat的内部属性包括:
    *全局#调度程序_类型_属性
    *全局#调度程序_请求_路径_属性
    *全局#异步_支持_属性
    *全局#证书_属性(仅限SSL连接)
    *Global#CIPHER _SUITE _ATTR(仅限SSL连接)
    *全局#密钥_大小_属性(仅限SSL连接)
    *全局#SSL _会话_ID _属性(仅限SSL连接)
    *全局#SSL _会话_管理_属性(仅限SSL连接)
    *全局#参数_解析_失败_属性
    底层连接器还可能公开请求属性。这些名称都以“org.apache.tomcat”开头,包括:
    *Globals#SENDFILE _SUPPORTED _ATTR
    *全球#彗星_支持_属性
    *全局#彗星_超时_支持_属性
    连接器实现可能会返回部分、全部或不返回这些属性,还可能支持其他属性。

代码示例

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

@Override
  public Enumeration<String> run() {
    return request.getAttributeNames();
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

@Override
  public Enumeration<String> run() {
    return request.getAttributeNames();
  }            
}

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

@Override
  public Enumeration<String> run() {
    return request.getAttributeNames();
  }
}

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

public Object run() {
    return request.getAttributeNames();
  }            
}

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

@Override
  public Enumeration<String> run() {
    return request.getAttributeNames();
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

@Override
  public Enumeration<String> run() {
    return request.getAttributeNames();
  }            
}

代码示例来源:origin: org.glassfish.main.web/web-core

public Enumeration<String> run() {
    return request.getAttributeNames();
  }            
}

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

@Override
  public Enumeration<String> run() {
    return request.getAttributeNames();
  }
}

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

@Override
  public Enumeration<String> run() {
    return request.getAttributeNames();
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

@Override
  public Enumeration<String> run() {
    return request.getAttributeNames();
  }            
}

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

public Enumeration getAttributeNames() {
  if (request == null) {
    throw new IllegalStateException(
            sm.getString("requestFacade.nullRequest"));
  }
  if (System.getSecurityManager() != null){
    return (Enumeration)AccessController.doPrivileged(
      new GetAttributePrivilegedAction());        
  } else {
    return request.getAttributeNames();
  }
}

代码示例来源:origin: org.glassfish.main.web/web-core

@Override
public Enumeration<String> getAttributeNames() {
  if (request == null) {
    throw new IllegalStateException(rb.getString(LogFacade.CANNOT_USE_REQUEST_OBJECT_OUTSIDE_SCOPE_EXCEPTION));
  }
  if (SecurityUtil.isPackageProtectionEnabled()){
    return AccessController.doPrivileged(
      new GetAttributePrivilegedAction());        
  } else {
    return request.getAttributeNames();
  }
}

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

public Enumeration getAttributeNames() {
  if (request == null) {
    throw new IllegalStateException(
            sm.getString("requestFacade.nullRequest"));
  }
  if (Globals.IS_SECURITY_ENABLED){
    return (Enumeration)AccessController.doPrivileged(
      new GetAttributePrivilegedAction());        
  } else {
    return request.getAttributeNames();
  }
}

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

@Override
public Enumeration<String> getAttributeNames() {
  if (request == null) {
    throw new IllegalStateException(
            sm.getString("requestFacade.nullRequest"));
  }
  if (Globals.IS_SECURITY_ENABLED){
    return AccessController.doPrivileged(
      new GetAttributePrivilegedAction());
  } else {
    return request.getAttributeNames();
  }
}

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

@Override
public Enumeration<String> getAttributeNames() {
  if (request == null) {
    throw new IllegalStateException(
            sm.getString("requestFacade.nullRequest"));
  }
  if (Globals.IS_SECURITY_ENABLED){
    return AccessController.doPrivileged(
      new GetAttributePrivilegedAction());
  } else {
    return request.getAttributeNames();
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

@Override
public Enumeration<String> getAttributeNames() {
  if (request == null) {
    throw new IllegalStateException(
            sm.getString("requestFacade.nullRequest"));
  }
  if (Globals.IS_SECURITY_ENABLED){
    return AccessController.doPrivileged(
      new GetAttributePrivilegedAction());        
  } else {
    return request.getAttributeNames();
  }
}

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

@Override
public Enumeration<String> getAttributeNames() {
  if (request == null) {
    throw new IllegalStateException(
            sm.getString("requestFacade.nullRequest"));
  }
  if (Globals.IS_SECURITY_ENABLED){
    return AccessController.doPrivileged(
      new GetAttributePrivilegedAction());
  } else {
    return request.getAttributeNames();
  }
}

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

@Override
public Enumeration<String> getAttributeNames() {
  if (request == null) {
    throw new IllegalStateException(
            sm.getString("requestFacade.nullRequest"));
  }
  if (Globals.IS_SECURITY_ENABLED){
    return AccessController.doPrivileged(
      new GetAttributePrivilegedAction());
  } else {
    return request.getAttributeNames();
  }
}

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

@Override
public Enumeration<String> getAttributeNames() {
  if (request == null) {
    throw new IllegalStateException(
            sm.getString("requestFacade.nullRequest"));
  }
  if (Globals.IS_SECURITY_ENABLED){
    return AccessController.doPrivileged(
      new GetAttributePrivilegedAction());
  } else {
    return request.getAttributeNames();
  }
}

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

public Enumeration getAttributeNames() {
  if (request == null) {
    throw MESSAGES.nullRequestFacade();
  }
  if (Globals.IS_SECURITY_ENABLED){
    return (Enumeration)AccessController.doPrivileged(
      new GetAttributePrivilegedAction());        
  } else {
    return request.getAttributeNames();
  }
}

相关文章

Request类方法