public class SessionCookieConfig extends Object implements SessionConfig
SessionConfig.SessionCookieSource
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SESSION_ID |
ATTACHMENT_KEY
Constructor and Description |
---|
SessionCookieConfig() |
Modifier and Type | Method and Description |
---|---|
void |
clearSession(HttpServerExchange exchange,
String sessionId)
Clears this session from the exchange, removing the attachment and making any changes to the response necessary,
such as clearing cookies.
|
String |
findSessionId(HttpServerExchange exchange)
Retrieves a session id of an existing session from an exchange.
|
String |
getComment() |
String |
getCookieName() |
String |
getDomain() |
int |
getMaxAge() |
String |
getPath() |
boolean |
isDiscard() |
boolean |
isHttpOnly() |
boolean |
isSecure() |
String |
rewriteUrl(String originalUrl,
String sessionId) |
SessionConfig.SessionCookieSource |
sessionCookieSource(HttpServerExchange exchange) |
SessionCookieConfig |
setComment(String comment) |
SessionCookieConfig |
setCookieName(String cookieName) |
SessionCookieConfig |
setDiscard(boolean discard) |
SessionCookieConfig |
setDomain(String domain) |
SessionCookieConfig |
setHttpOnly(boolean httpOnly) |
SessionCookieConfig |
setMaxAge(int maxAge) |
SessionCookieConfig |
setPath(String path) |
SessionCookieConfig |
setSecure(boolean secure) |
void |
setSessionId(HttpServerExchange exchange,
String sessionId)
Attaches the session to the exchange.
|
public static final String DEFAULT_SESSION_ID
public String rewriteUrl(String originalUrl, String sessionId)
rewriteUrl
in interface SessionConfig
public void setSessionId(HttpServerExchange exchange, String sessionId)
SessionConfig
SessionConfig.findSessionId(io.undertow.server.HttpServerExchange)
setSessionId
in interface SessionConfig
exchange
- The exchangesessionId
- The sessionpublic void clearSession(HttpServerExchange exchange, String sessionId)
SessionConfig
clearSession
in interface SessionConfig
exchange
- The exchangesessionId
- The session idpublic String findSessionId(HttpServerExchange exchange)
SessionConfig
findSessionId
in interface SessionConfig
exchange
- The exchangepublic SessionConfig.SessionCookieSource sessionCookieSource(HttpServerExchange exchange)
sessionCookieSource
in interface SessionConfig
public String getCookieName()
public SessionCookieConfig setCookieName(String cookieName)
public String getPath()
public SessionCookieConfig setPath(String path)
public String getDomain()
public SessionCookieConfig setDomain(String domain)
public boolean isDiscard()
public SessionCookieConfig setDiscard(boolean discard)
public boolean isSecure()
public SessionCookieConfig setSecure(boolean secure)
public boolean isHttpOnly()
public SessionCookieConfig setHttpOnly(boolean httpOnly)
public int getMaxAge()
public SessionCookieConfig setMaxAge(int maxAge)
public String getComment()
public SessionCookieConfig setComment(String comment)
Copyright © 2014 JBoss by Red Hat. All rights reserved.