Class SessionConfig
- java.lang.Object
-
- org.apache.tomcat.util.descriptor.web.SessionConfig
-
public class SessionConfig extends java.lang.ObjectRepresentation of a session configuration element for a web application, as represented in a<session-config>element in the deployment descriptor.
-
-
Constructor Summary
Constructors Constructor Description SessionConfig()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSessionTrackingMode(java.lang.String sessionTrackingMode)Adds a session tracking mode.java.lang.StringgetCookieAttribute(java.lang.String name)Returns a cookie attribute value.java.util.Map<java.lang.String,java.lang.String>getCookieAttributes()Returns the cookie attributes map.java.lang.StringgetCookieComment()Returns the cookie comment.java.lang.StringgetCookieDomain()Returns the cookie domain.java.lang.BooleangetCookieHttpOnly()Returns the cookie HTTP-only flag.java.lang.IntegergetCookieMaxAge()Returns the cookie max age.java.lang.StringgetCookieName()Returns the cookie name.java.lang.StringgetCookiePath()Returns the cookie path.java.lang.BooleangetCookieSecure()Returns the cookie secure flag.java.lang.IntegergetSessionTimeout()Returns the session timeout.java.util.EnumSet<SessionTrackingMode>getSessionTrackingModes()Returns the session tracking modes.voidsetCookieAttribute(java.lang.String name, java.lang.String value)Sets a cookie attribute.voidsetCookieComment(java.lang.String cookieComment)Sets the cookie comment.voidsetCookieDomain(java.lang.String cookieDomain)Sets the cookie domain.voidsetCookieHttpOnly(java.lang.String cookieHttpOnly)Sets the cookie HTTP-only flag.voidsetCookieMaxAge(java.lang.String cookieMaxAge)Sets the cookie max age.voidsetCookieName(java.lang.String cookieName)Sets the cookie name.voidsetCookiePath(java.lang.String cookiePath)Sets the cookie path.voidsetCookieSecure(java.lang.String cookieSecure)Sets the cookie secure flag.voidsetSessionTimeout(java.lang.String sessionTimeout)Sets the session timeout.
-
-
-
Method Detail
-
getSessionTimeout
public java.lang.Integer getSessionTimeout()
Returns the session timeout.- Returns:
- the session timeout
-
setSessionTimeout
public void setSessionTimeout(java.lang.String sessionTimeout)
Sets the session timeout.- Parameters:
sessionTimeout- the session timeout
-
getCookieName
public java.lang.String getCookieName()
Returns the cookie name.- Returns:
- the cookie name
-
setCookieName
public void setCookieName(java.lang.String cookieName)
Sets the cookie name.- Parameters:
cookieName- the cookie name
-
getCookieDomain
public java.lang.String getCookieDomain()
Returns the cookie domain.- Returns:
- the cookie domain
-
setCookieDomain
public void setCookieDomain(java.lang.String cookieDomain)
Sets the cookie domain.- Parameters:
cookieDomain- the cookie domain
-
getCookiePath
public java.lang.String getCookiePath()
Returns the cookie path.- Returns:
- the cookie path
-
setCookiePath
public void setCookiePath(java.lang.String cookiePath)
Sets the cookie path.- Parameters:
cookiePath- the cookie path
-
getCookieComment
public java.lang.String getCookieComment()
Returns the cookie comment.- Returns:
- the cookie comment
-
setCookieComment
public void setCookieComment(java.lang.String cookieComment)
Sets the cookie comment.- Parameters:
cookieComment- the cookie comment
-
getCookieHttpOnly
public java.lang.Boolean getCookieHttpOnly()
Returns the cookie HTTP-only flag.- Returns:
- the HTTP-only flag
-
setCookieHttpOnly
public void setCookieHttpOnly(java.lang.String cookieHttpOnly)
Sets the cookie HTTP-only flag.- Parameters:
cookieHttpOnly- the HTTP-only flag
-
getCookieSecure
public java.lang.Boolean getCookieSecure()
Returns the cookie secure flag.- Returns:
- the secure flag
-
setCookieSecure
public void setCookieSecure(java.lang.String cookieSecure)
Sets the cookie secure flag.- Parameters:
cookieSecure- the secure flag
-
getCookieMaxAge
public java.lang.Integer getCookieMaxAge()
Returns the cookie max age.- Returns:
- the max age
-
setCookieMaxAge
public void setCookieMaxAge(java.lang.String cookieMaxAge)
Sets the cookie max age.- Parameters:
cookieMaxAge- the max age
-
getCookieAttributes
public java.util.Map<java.lang.String,java.lang.String> getCookieAttributes()
Returns the cookie attributes map.- Returns:
- the cookie attributes
-
setCookieAttribute
public void setCookieAttribute(java.lang.String name, java.lang.String value)Sets a cookie attribute.- Parameters:
name- the attribute namevalue- the attribute value
-
getCookieAttribute
public java.lang.String getCookieAttribute(java.lang.String name)
Returns a cookie attribute value.- Parameters:
name- the attribute name- Returns:
- the attribute value
-
getSessionTrackingModes
public java.util.EnumSet<SessionTrackingMode> getSessionTrackingModes()
Returns the session tracking modes.- Returns:
- the session tracking modes
-
addSessionTrackingMode
public void addSessionTrackingMode(java.lang.String sessionTrackingMode)
Adds a session tracking mode.- Parameters:
sessionTrackingMode- the tracking mode to add
-
-