org.glassfish.grizzly.http.server.Request.isSSLAttribute()方法的使用及代码示例

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

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

Request.isSSLAttribute介绍

[英]Test if a given name is one of the special Servlet-spec SSL attributes.
[中]测试给定名称是否是特殊的Servlet规范SSL属性之一。

代码示例

代码示例来源:origin: javaee/grizzly

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    assert response != null;
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    assert response != null;
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

代码示例来源:origin: javaee/grizzly

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    assert response != null;
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

代码示例来源:origin: javaee/grizzly

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    assert response != null;
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-http-server-core

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    assert response != null;
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

代码示例来源:origin: org.glassfish.grizzly/grizzly-websockets-server

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    assert response != null;
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

代码示例来源:origin: javaee/grizzly

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    assert response != null;
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

代码示例来源:origin: javaee/grizzly

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    assert response != null;
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

代码示例来源:origin: org.mule.glassfish.grizzly/grizzly-http-server

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

代码示例来源:origin: javaee/grizzly

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    assert response != null;
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

代码示例来源:origin: javaee/grizzly

/**
 * Return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 *
 * @param name Name of the request attribute to return
 * @return the specified request attribute if it exists; otherwise, return
 * <code>null</code>.
 */
public Object getAttribute(final String name) {
  if (SEND_FILE_ENABLED_ATTR.equals(name)) {
    assert response != null;
    return response.isSendFileEnabled();
  }
  Object attribute = request.getAttribute(name);
  if (attribute != null) {
    return attribute;
  }
  if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
    attribute = RequestUtils.populateCertificateAttribute(this);
    if (attribute != null) {
      request.setAttribute(name, attribute);
    }
  } else if (isSSLAttribute(name)) {
    RequestUtils.populateSSLAttributes(this);
    attribute = request.getAttribute(name);
  } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
    return requestDispatcherPath;
  }
  return attribute;
}

相关文章

Request类方法