SessionConfigpublic class PathParameterSessionConfig extends java.lang.Object implements SessionConfig
SessionConfig.SessionCookieSourceATTACHMENT_KEY| Constructor | Description |
|---|---|
PathParameterSessionConfig() |
|
PathParameterSessionConfig(java.lang.String name) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
clearSession(HttpServerExchange exchange,
java.lang.String sessionId) |
Clears this session from the exchange, removing the attachment and making any changes to the response necessary,
such as clearing cookies.
|
java.lang.String |
findSessionId(HttpServerExchange exchange) |
Retrieves a session id of an existing session from an exchange.
|
java.lang.String |
rewriteUrl(java.lang.String url,
java.lang.String sessionId) |
Return the specified URL with the specified session identifier
suitably encoded.
|
SessionConfig.SessionCookieSource |
sessionCookieSource(HttpServerExchange exchange) |
|
void |
setSessionId(HttpServerExchange exchange,
java.lang.String sessionId) |
Attaches the session to the exchange.
|
public PathParameterSessionConfig(java.lang.String name)
public PathParameterSessionConfig()
public void setSessionId(HttpServerExchange exchange, java.lang.String sessionId)
SessionConfigGenerally this will involve setting a cookie
Once a session has been attached it must be possible to retrieve it via
SessionConfig.findSessionId(io.undertow.server.HttpServerExchange)
setSessionId in interface SessionConfigexchange - The exchangesessionId - The sessionpublic void clearSession(HttpServerExchange exchange, java.lang.String sessionId)
SessionConfigclearSession in interface SessionConfigexchange - The exchangesessionId - The session idpublic java.lang.String findSessionId(HttpServerExchange exchange)
SessionConfigfindSessionId in interface SessionConfigexchange - The exchangepublic SessionConfig.SessionCookieSource sessionCookieSource(HttpServerExchange exchange)
sessionCookieSource in interface SessionConfigpublic java.lang.String rewriteUrl(java.lang.String url,
java.lang.String sessionId)
rewriteUrl in interface SessionConfigurl - URL to be encoded with the session idsessionId - Session id to be included in the encoded URLCopyright © 2018. All rights reserved.