Package javax.servlet
Interface SessionCookieConfig
-
- All Known Implementing Classes:
SessionHandler.CookieConfig
public interface SessionCookieConfig
Configures the session cookies used by the web application associated with the ServletContext from which this SessionCookieConfig was obtained.- Since:
- Servlet 3.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getComment()
java.lang.String
getDomain()
int
getMaxAge()
java.lang.String
getName()
java.lang.String
getPath()
boolean
isHttpOnly()
boolean
isSecure()
void
setComment(java.lang.String comment)
Sets the comment for the session cookievoid
setDomain(java.lang.String domain)
Sets the domain for the session cookievoid
setHttpOnly(boolean httpOnly)
Sets the httpOnly flag for the session cookie.void
setMaxAge(int MaxAge)
Sets the maximum age.void
setName(java.lang.String name)
Sets the session cookie name.void
setPath(java.lang.String path)
Sets the path of the session cookie.void
setSecure(boolean secure)
Sets the secure flag for the session cookie.
-
-
-
Method Detail
-
setName
void setName(java.lang.String name)
Sets the session cookie name.- Parameters:
name
- The name of the session cookie- Throws:
java.lang.IllegalStateException
- if the associated ServletContext has already been initialised
-
getName
java.lang.String getName()
-
setDomain
void setDomain(java.lang.String domain)
Sets the domain for the session cookie- Parameters:
domain
- The session cookie domain- Throws:
java.lang.IllegalStateException
- if the associated ServletContext has already been initialised
-
getDomain
java.lang.String getDomain()
-
setPath
void setPath(java.lang.String path)
Sets the path of the session cookie.- Parameters:
path
- The session cookie path- Throws:
java.lang.IllegalStateException
- if the associated ServletContext has already been initialised
-
getPath
java.lang.String getPath()
-
setComment
void setComment(java.lang.String comment)
Sets the comment for the session cookie- Parameters:
comment
- The session cookie comment- Throws:
java.lang.IllegalStateException
- if the associated ServletContext has already been initialised
-
getComment
java.lang.String getComment()
-
setHttpOnly
void setHttpOnly(boolean httpOnly)
Sets the httpOnly flag for the session cookie.- Parameters:
httpOnly
- The httpOnly setting to use for session cookies- Throws:
java.lang.IllegalStateException
- if the associated ServletContext has already been initialised
-
isHttpOnly
boolean isHttpOnly()
-
setSecure
void setSecure(boolean secure)
Sets the secure flag for the session cookie.- Parameters:
secure
- The secure setting to use for session cookies- Throws:
java.lang.IllegalStateException
- if the associated ServletContext has already been initialised
-
isSecure
boolean isSecure()
-
setMaxAge
void setMaxAge(int MaxAge)
Sets the maximum age.- Parameters:
MaxAge
- the maximum age to set- Throws:
java.lang.IllegalStateException
- if the associated ServletContext has already been initialised
-
getMaxAge
int getMaxAge()
-
-