Package com.sun.enterprise.web.session
Class SessionCookieConfig
- java.lang.Object
-
- com.sun.enterprise.web.session.SessionCookieConfig
-
public final class SessionCookieConfig extends Object
Representation of the session cookie configuration element for a web application. This configuration is not specified as part of the standard deployment descriptor but as part of the iAS 7.0's "extended" web application deployment descriptor - ias-web.xml.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DYNAMIC_SECURE
The value that allows the JSESSIONID cookie's secure attribute to be configured based on the connection i.e.
-
Constructor Summary
Constructors Constructor Description SessionCookieConfig()
Construct a new SessionCookieConfig with default properties.SessionCookieConfig(String name, String path, int maxAge, String domain, String comment)
Construct a new SessionCookieConfig with the specified properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getComment()
Return the URLEncoded form of the comment that identifies the session cookie.String
getDomain()
Return the domain for which the cookie is valid.Boolean
getHttpOnly()
Integer
getMaxAge()
Return the expiration time for the session cookie.String
getName()
Return the name of the session tracking cookie.String
getPath()
Return the path that is set when the session tracking cookie is created.String
getSecure()
Return whether the cookie is to be marked Secure or not.void
setComment(String comment)
Set the comment that identifies the session cookie.void
setDomain(String domain)
Set the domain for which the cookie is valid.void
setHttpOnly(Boolean httpOnly)
void
setMaxAge(Integer maxAge)
Set the expiration time for the session cookie.void
setName(String name)
Set the name of the session tracking cookie (currently not supported).void
setPath(String path)
Set the path to use when creating the session tracking cookie.void
setSecure(String secure)
Set whether the cookie is marked Secure or not.String
toString()
Return a String representation of this object.
-
-
-
Field Detail
-
DYNAMIC_SECURE
public static final String DYNAMIC_SECURE
The value that allows the JSESSIONID cookie's secure attribute to be configured based on the connection i.e. secure if HTTPS.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SessionCookieConfig
public SessionCookieConfig()
Construct a new SessionCookieConfig with default properties.
-
SessionCookieConfig
public SessionCookieConfig(String name, String path, int maxAge, String domain, String comment)
Construct a new SessionCookieConfig with the specified properties.- Parameters:
name
- The name of the cookie used for session trackingpath
- The pathname that is set when the cookie is createdmaxAge
- The expiration time (in seconds) of the session cookie (-1 indicates 'never expire')domain
- The domain for which the cookie is validcomment
- The comment that identifies the session tracking cookie in the cookie file.
-
-
Method Detail
-
setName
public void setName(String name)
Set the name of the session tracking cookie (currently not supported).
-
getName
public String getName()
Return the name of the session tracking cookie.
-
setPath
public void setPath(String path)
Set the path to use when creating the session tracking cookie.
-
getPath
public String getPath()
Return the path that is set when the session tracking cookie is created.
-
setMaxAge
public void setMaxAge(Integer maxAge)
Set the expiration time for the session cookie.
-
getMaxAge
public Integer getMaxAge()
Return the expiration time for the session cookie.
-
setDomain
public void setDomain(String domain)
Set the domain for which the cookie is valid.
-
getDomain
public String getDomain()
Return the domain for which the cookie is valid.
-
setComment
public void setComment(String comment)
Set the comment that identifies the session cookie.
-
getComment
public String getComment()
Return the URLEncoded form of the comment that identifies the session cookie.
-
setSecure
public void setSecure(String secure) throws IllegalArgumentException
Set whether the cookie is marked Secure or not.- Parameters:
secure
- Valid values are "dynamic", "true" or "false"- Throws:
IllegalArgumentException
-
getSecure
public String getSecure()
Return whether the cookie is to be marked Secure or not.- Returns:
- "dynamic", "true" or "false"
-
setHttpOnly
public void setHttpOnly(Boolean httpOnly)
-
getHttpOnly
public Boolean getHttpOnly()
-
-