public class SessionCookieConfigImpl extends Object implements javax.servlet.SessionCookieConfig, SessionConfig
SessionConfig.SessionCookieSource
ATTACHMENT_KEY
Constructor and Description |
---|
SessionCookieConfigImpl(ServletContextImpl servletContext) |
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 | getDomain() |
SessionConfig | getFallback() |
int | getMaxAge() |
String | getName() |
String | getPath() |
boolean | isHttpOnly() |
boolean | isSecure() |
String | rewriteUrl(String originalUrl, String sessionid) |
SessionConfig.SessionCookieSource | sessionCookieSource(HttpServerExchange exchange) |
void | setComment(String comment) |
void | setDomain(String domain) |
void | setFallback(SessionConfig fallback) |
void | setHttpOnly(boolean httpOnly) |
void | setMaxAge(int maxAge) |
void | setName(String name) |
void | setPath(String path) |
void | setSecure(boolean secure) |
void | setSessionId(HttpServerExchange exchange, String sessionId) Attaches the session to the exchange. |
public SessionCookieConfigImpl(ServletContextImpl servletContext)
public String rewriteUrl(String originalUrl, String sessionid)
rewriteUrl
in interface SessionConfig
public void setSessionId(HttpServerExchange exchange, String sessionId)
SessionConfig
Generally 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 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 getName()
getName
in interface javax.servlet.SessionCookieConfig
public void setName(String name)
setName
in interface javax.servlet.SessionCookieConfig
public String getDomain()
getDomain
in interface javax.servlet.SessionCookieConfig
public void setDomain(String domain)
setDomain
in interface javax.servlet.SessionCookieConfig
public String getPath()
getPath
in interface javax.servlet.SessionCookieConfig
public void setPath(String path)
setPath
in interface javax.servlet.SessionCookieConfig
public String getComment()
getComment
in interface javax.servlet.SessionCookieConfig
public void setComment(String comment)
setComment
in interface javax.servlet.SessionCookieConfig
public boolean isHttpOnly()
isHttpOnly
in interface javax.servlet.SessionCookieConfig
public void setHttpOnly(boolean httpOnly)
setHttpOnly
in interface javax.servlet.SessionCookieConfig
public boolean isSecure()
isSecure
in interface javax.servlet.SessionCookieConfig
public void setSecure(boolean secure)
setSecure
in interface javax.servlet.SessionCookieConfig
public int getMaxAge()
getMaxAge
in interface javax.servlet.SessionCookieConfig
public void setMaxAge(int maxAge)
setMaxAge
in interface javax.servlet.SessionCookieConfig
public SessionConfig getFallback()
public void setFallback(SessionConfig fallback)
Copyright © 2020 JBoss by Red Hat. All rights reserved.