public class SessionCookieConfigImpl extends Object implements javax.servlet.SessionCookieConfig
Constructor and Description |
---|
SessionCookieConfigImpl(StandardContext ctx)
Constructor
|
Modifier and Type | Method and Description |
---|---|
String |
getComment() |
String |
getDomain() |
int |
getMaxAge() |
String |
getName() |
String |
getPath() |
boolean |
isHttpOnly() |
boolean |
isSecure() |
void |
setComment(String comment) |
void |
setDomain(String domain) |
void |
setHttpOnly(boolean httpOnly) |
void |
setMaxAge(int maxAge) |
void |
setName(String name) |
void |
setPath(String path) |
void |
setSecure(boolean secure) |
public SessionCookieConfigImpl(StandardContext ctx)
public void setName(String name)
setName
in interface javax.servlet.SessionCookieConfig
name
- the cookie name to useIllegalStateException
- if the ServletContext
from which this SessionCookieConfig was acquired has
already been initializedpublic String getName()
getName
in interface javax.servlet.SessionCookieConfig
setName(java.lang.String)
, or
JSESSIONID if setName(java.lang.String)
was never calledpublic void setDomain(String domain)
setDomain
in interface javax.servlet.SessionCookieConfig
domain
- the cookie domain to useIllegalStateException
- if the ServletContext
from which this SessionCookieConfig was acquired has
already been initializedpublic String getDomain()
getDomain
in interface javax.servlet.SessionCookieConfig
setDomain(java.lang.String)
, or
null if setDomain(java.lang.String)
was never calledpublic void setPath(String path)
setPath
in interface javax.servlet.SessionCookieConfig
path
- the cookie path to useIllegalStateException
- if the ServletContext
from which this SessionCookieConfig was acquired has
already been initializedpublic String getPath()
getPath
in interface javax.servlet.SessionCookieConfig
setPath(java.lang.String)
, or the context
path of the ServletContext from which this
SessionCookieConfig was acquired if setPath(java.lang.String)
was never calledpublic void setComment(String comment)
setComment
in interface javax.servlet.SessionCookieConfig
comment
- the cookie comment to useIllegalStateException
- if the ServletContext
from which this SessionCookieConfig was acquired has
already been initializedpublic String getComment()
getComment
in interface javax.servlet.SessionCookieConfig
setComment(java.lang.String)
, or
null if setComment(java.lang.String)
was never calledpublic void setHttpOnly(boolean httpOnly)
setHttpOnly
in interface javax.servlet.SessionCookieConfig
httpOnly
- true if the session tracking cookies created
on behalf of the ServletContext from which this
SessionCookieConfig was acquired shall be marked as
HttpOnly, false otherwiseIllegalStateException
- if the ServletContext
from which this SessionCookieConfig was acquired has
already been initializedpublic boolean isHttpOnly()
isHttpOnly
in interface javax.servlet.SessionCookieConfig
public void setSecure(boolean secure)
setSecure
in interface javax.servlet.SessionCookieConfig
secure
- true if the session tracking cookies created on
behalf of the ServletContext from which this
SessionCookieConfig was acquired shall be marked as
secure even if the request that initiated the corresponding
session is using plain HTTP instead of HTTPS, and false if they
shall be marked as secure only if the request that initiated
the corresponding session was also secureIllegalStateException
- if the ServletContext
from which this SessionCookieConfig was acquired has
already been initializedpublic boolean isSecure()
isSecure
in interface javax.servlet.SessionCookieConfig
public void setMaxAge(int maxAge)
setMaxAge
in interface javax.servlet.SessionCookieConfig
public int getMaxAge()
getMaxAge
in interface javax.servlet.SessionCookieConfig
Copyright © 2019. All rights reserved.