public class SessionCookieConfig extends Object implements SessionConfig
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_SESSION_ID |
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) |
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 exchangepublic void clearSession(HttpServerExchange exchange, String sessionId)
SessionConfig
clearSession
in interface SessionConfig
exchange
- The exchangepublic String findSessionId(HttpServerExchange exchange)
SessionConfig
findSessionId
in interface SessionConfig
exchange
- The exchangepublic 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 © 2013 JBoss by Red Hat. All Rights Reserved.