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

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

本文整理了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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. assert response != null;
  12. return response.isSendFileEnabled();
  13. }
  14. Object attribute = request.getAttribute(name);
  15. if (attribute != null) {
  16. return attribute;
  17. }
  18. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  19. attribute = RequestUtils.populateCertificateAttribute(this);
  20. if (attribute != null) {
  21. request.setAttribute(name, attribute);
  22. }
  23. } else if (isSSLAttribute(name)) {
  24. RequestUtils.populateSSLAttributes(this);
  25. attribute = request.getAttribute(name);
  26. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  27. return requestDispatcherPath;
  28. }
  29. return attribute;
  30. }

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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. assert response != null;
  12. return response.isSendFileEnabled();
  13. }
  14. Object attribute = request.getAttribute(name);
  15. if (attribute != null) {
  16. return attribute;
  17. }
  18. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  19. attribute = RequestUtils.populateCertificateAttribute(this);
  20. if (attribute != null) {
  21. request.setAttribute(name, attribute);
  22. }
  23. } else if (isSSLAttribute(name)) {
  24. RequestUtils.populateSSLAttributes(this);
  25. attribute = request.getAttribute(name);
  26. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  27. return requestDispatcherPath;
  28. }
  29. return attribute;
  30. }

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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. assert response != null;
  12. return response.isSendFileEnabled();
  13. }
  14. Object attribute = request.getAttribute(name);
  15. if (attribute != null) {
  16. return attribute;
  17. }
  18. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  19. attribute = RequestUtils.populateCertificateAttribute(this);
  20. if (attribute != null) {
  21. request.setAttribute(name, attribute);
  22. }
  23. } else if (isSSLAttribute(name)) {
  24. RequestUtils.populateSSLAttributes(this);
  25. attribute = request.getAttribute(name);
  26. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  27. return requestDispatcherPath;
  28. }
  29. return attribute;
  30. }

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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. assert response != null;
  12. return response.isSendFileEnabled();
  13. }
  14. Object attribute = request.getAttribute(name);
  15. if (attribute != null) {
  16. return attribute;
  17. }
  18. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  19. attribute = RequestUtils.populateCertificateAttribute(this);
  20. if (attribute != null) {
  21. request.setAttribute(name, attribute);
  22. }
  23. } else if (isSSLAttribute(name)) {
  24. RequestUtils.populateSSLAttributes(this);
  25. attribute = request.getAttribute(name);
  26. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  27. return requestDispatcherPath;
  28. }
  29. return attribute;
  30. }

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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. assert response != null;
  12. return response.isSendFileEnabled();
  13. }
  14. Object attribute = request.getAttribute(name);
  15. if (attribute != null) {
  16. return attribute;
  17. }
  18. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  19. attribute = RequestUtils.populateCertificateAttribute(this);
  20. if (attribute != null) {
  21. request.setAttribute(name, attribute);
  22. }
  23. } else if (isSSLAttribute(name)) {
  24. RequestUtils.populateSSLAttributes(this);
  25. attribute = request.getAttribute(name);
  26. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  27. return requestDispatcherPath;
  28. }
  29. return attribute;
  30. }

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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. assert response != null;
  12. return response.isSendFileEnabled();
  13. }
  14. Object attribute = request.getAttribute(name);
  15. if (attribute != null) {
  16. return attribute;
  17. }
  18. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  19. attribute = RequestUtils.populateCertificateAttribute(this);
  20. if (attribute != null) {
  21. request.setAttribute(name, attribute);
  22. }
  23. } else if (isSSLAttribute(name)) {
  24. RequestUtils.populateSSLAttributes(this);
  25. attribute = request.getAttribute(name);
  26. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  27. return requestDispatcherPath;
  28. }
  29. return attribute;
  30. }

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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. assert response != null;
  12. return response.isSendFileEnabled();
  13. }
  14. Object attribute = request.getAttribute(name);
  15. if (attribute != null) {
  16. return attribute;
  17. }
  18. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  19. attribute = RequestUtils.populateCertificateAttribute(this);
  20. if (attribute != null) {
  21. request.setAttribute(name, attribute);
  22. }
  23. } else if (isSSLAttribute(name)) {
  24. RequestUtils.populateSSLAttributes(this);
  25. attribute = request.getAttribute(name);
  26. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  27. return requestDispatcherPath;
  28. }
  29. return attribute;
  30. }

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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. assert response != null;
  12. return response.isSendFileEnabled();
  13. }
  14. Object attribute = request.getAttribute(name);
  15. if (attribute != null) {
  16. return attribute;
  17. }
  18. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  19. attribute = RequestUtils.populateCertificateAttribute(this);
  20. if (attribute != null) {
  21. request.setAttribute(name, attribute);
  22. }
  23. } else if (isSSLAttribute(name)) {
  24. RequestUtils.populateSSLAttributes(this);
  25. attribute = request.getAttribute(name);
  26. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  27. return requestDispatcherPath;
  28. }
  29. return attribute;
  30. }

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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. return response.isSendFileEnabled();
  12. }
  13. Object attribute = request.getAttribute(name);
  14. if (attribute != null) {
  15. return attribute;
  16. }
  17. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  18. attribute = RequestUtils.populateCertificateAttribute(this);
  19. if (attribute != null) {
  20. request.setAttribute(name, attribute);
  21. }
  22. } else if (isSSLAttribute(name)) {
  23. RequestUtils.populateSSLAttributes(this);
  24. attribute = request.getAttribute(name);
  25. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  26. return requestDispatcherPath;
  27. }
  28. return attribute;
  29. }

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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. assert response != null;
  12. return response.isSendFileEnabled();
  13. }
  14. Object attribute = request.getAttribute(name);
  15. if (attribute != null) {
  16. return attribute;
  17. }
  18. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  19. attribute = RequestUtils.populateCertificateAttribute(this);
  20. if (attribute != null) {
  21. request.setAttribute(name, attribute);
  22. }
  23. } else if (isSSLAttribute(name)) {
  24. RequestUtils.populateSSLAttributes(this);
  25. attribute = request.getAttribute(name);
  26. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  27. return requestDispatcherPath;
  28. }
  29. return attribute;
  30. }

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

  1. /**
  2. * Return the specified request attribute if it exists; otherwise, return
  3. * <code>null</code>.
  4. *
  5. * @param name Name of the request attribute to return
  6. * @return the specified request attribute if it exists; otherwise, return
  7. * <code>null</code>.
  8. */
  9. public Object getAttribute(final String name) {
  10. if (SEND_FILE_ENABLED_ATTR.equals(name)) {
  11. assert response != null;
  12. return response.isSendFileEnabled();
  13. }
  14. Object attribute = request.getAttribute(name);
  15. if (attribute != null) {
  16. return attribute;
  17. }
  18. if (Globals.SSL_CERTIFICATE_ATTR.equals(name)) {
  19. attribute = RequestUtils.populateCertificateAttribute(this);
  20. if (attribute != null) {
  21. request.setAttribute(name, attribute);
  22. }
  23. } else if (isSSLAttribute(name)) {
  24. RequestUtils.populateSSLAttributes(this);
  25. attribute = request.getAttribute(name);
  26. } else if (Globals.DISPATCHER_REQUEST_PATH_ATTR.equals(name)) {
  27. return requestDispatcherPath;
  28. }
  29. return attribute;
  30. }

相关文章

Request类方法