public class ApplicationSessionCookieConfig extends Object implements SessionCookieConfig
Constructor and Description |
---|
ApplicationSessionCookieConfig(StandardContext context) |
Modifier and Type | Method and Description |
---|---|
static Cookie |
createSessionCookie(Context context,
String sessionId,
boolean secure)
Creates a new session cookie for the given session ID
|
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)
Sets the maximum age.
|
void |
setName(String name) |
void |
setPath(String path) |
void |
setSecure(boolean secure) |
public ApplicationSessionCookieConfig(StandardContext context)
public String getComment()
getComment
in interface SessionCookieConfig
public String getDomain()
getDomain
in interface SessionCookieConfig
public int getMaxAge()
getMaxAge
in interface SessionCookieConfig
public String getName()
getName
in interface SessionCookieConfig
public String getPath()
getPath
in interface SessionCookieConfig
public boolean isHttpOnly()
isHttpOnly
in interface SessionCookieConfig
public boolean isSecure()
isSecure
in interface SessionCookieConfig
public void setComment(String comment)
setComment
in interface SessionCookieConfig
public void setDomain(String domain)
setDomain
in interface SessionCookieConfig
public void setHttpOnly(boolean httpOnly)
setHttpOnly
in interface SessionCookieConfig
public void setMaxAge(int maxAge)
javax.servlet.SessionCookieConfig
setMaxAge
in interface SessionCookieConfig
maxAge
- the maximum age to setpublic void setName(String name)
setName
in interface SessionCookieConfig
public void setPath(String path)
setPath
in interface SessionCookieConfig
public void setSecure(boolean secure)
setSecure
in interface SessionCookieConfig
public static Cookie createSessionCookie(Context context, String sessionId, boolean secure)
context
- The Context for the web applicationsessionId
- The ID of the session for which the cookie will be
createdsecure
- Should session cookie be configured as secureCopyright © 2000-2014 Apache Software Foundation. All Rights Reserved.