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

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

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

Request.isRequestedSessionIdFromURL介绍

[英]Return true if the session identifier included in this request came from the request URI.
[中]如果此请求中包含的会话标识符来自请求URI,则返回true

代码示例

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public boolean isRequestedSessionIdFromURL() {
  6. return request.isRequestedSessionIdFromURL();
  7. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public boolean isRequestedSessionIdFromURL() {
  6. return request.isRequestedSessionIdFromURL();
  7. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public boolean isRequestedSessionIdFromURL() {
  6. return request.isRequestedSessionIdFromURL();
  7. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public boolean isRequestedSessionIdFromURL() {
  6. return request.isRequestedSessionIdFromURL();
  7. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public boolean isRequestedSessionIdFromURL() {
  6. return request.isRequestedSessionIdFromURL();
  7. }

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

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. public boolean isRequestedSessionIdFromURL() {
  6. return request.isRequestedSessionIdFromURL();
  7. }

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

  1. sessionId = request.getRequestedSessionId();
  2. sessionFromURL = request.isRequestedSessionIdFromURL();

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

  1. sessionId = request.getRequestedSessionId();
  2. sessionFromURL = request.isRequestedSessionIdFromURL();

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

  1. sessionId = request.getRequestedSessionId();
  2. sessionFromURL = request.isRequestedSessionIdFromURL();

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

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

  1. /**
  2. * Change the session id of the current session associated with this
  3. * request and return the new session id.
  4. *
  5. * @return the original session id
  6. *
  7. * @throws IllegalStateException if there is no session associated
  8. * with the request
  9. *
  10. * @since 2.3
  11. */
  12. public String changeSessionId() {
  13. Session sessionLocal = doGetSession(false);
  14. if (sessionLocal == null) {
  15. throw new IllegalStateException("changeSessionId has been called without a session");
  16. }
  17. String oldSessionId = getSessionManager().changeSessionId(this, sessionLocal);
  18. final String newSessionId = sessionLocal.getIdInternal();
  19. requestedSessionId = newSessionId;
  20. if (isRequestedSessionIdFromURL())
  21. return oldSessionId;
  22. if (response != null) {
  23. final Cookie cookie = new Cookie(obtainSessionCookieName(),
  24. newSessionId);
  25. configureSessionCookie(cookie);
  26. response.addSessionCookieInternal(cookie);
  27. }
  28. return oldSessionId;
  29. }

相关文章

Request类方法