com.sun.enterprise.web.session
Class SessionCookieConfig

java.lang.Object
  extended by com.sun.enterprise.web.session.SessionCookieConfig

public final class SessionCookieConfig
extends java.lang.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
static java.lang.String DYNAMIC_SECURE
          The value that allows the JSESSIONID cookie's secure attribute to be configured based on the connection i.e.
 
Constructor Summary
SessionCookieConfig()
          Construct a new SessionCookieConfig with default properties.
SessionCookieConfig(java.lang.String name, java.lang.String path, int maxAge, java.lang.String domain, java.lang.String comment)
          Construct a new SessionCookieConfig with the specified properties.
 
Method Summary
 java.lang.String getComment()
          Return the URLEncoded form of the comment that identifies the session cookie.
 java.lang.String getDomain()
          Return the domain for which the cookie is valid.
 java.lang.Boolean getHttpOnly()
           
 java.lang.Integer getMaxAge()
          Return the expiration time for the session cookie.
 java.lang.String getName()
          Return the name of the session tracking cookie.
 java.lang.String getPath()
          Return the path that is set when the session tracking cookie is created.
 java.lang.String getSecure()
          Return whether the cookie is to be marked Secure or not.
 void setComment(java.lang.String comment)
          Set the comment that identifies the session cookie.
 void setDomain(java.lang.String domain)
          Set the domain for which the cookie is valid.
 void setHttpOnly(java.lang.Boolean httpOnly)
           
 void setMaxAge(java.lang.Integer maxAge)
          Set the expiration time for the session cookie.
 void setName(java.lang.String name)
          Set the name of the session tracking cookie (currently not supported).
 void setPath(java.lang.String path)
          Set the path to use when creating the session tracking cookie.
 void setSecure(java.lang.String secure)
          Set whether the cookie is marked Secure or not.
 java.lang.String toString()
          Return a String representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DYNAMIC_SECURE

public static final java.lang.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(java.lang.String name,
                           java.lang.String path,
                           int maxAge,
                           java.lang.String domain,
                           java.lang.String comment)
Construct a new SessionCookieConfig with the specified properties.

Parameters:
name - The name of the cookie used for session tracking
path - The pathname that is set when the cookie is created
maxAge - The expiration time (in seconds) of the session cookie (-1 indicates 'never expire')
domain - The domain for which the cookie is valid
comment - The comment that identifies the session tracking cookie in the cookie file.
Method Detail

setName

public void setName(java.lang.String name)
Set the name of the session tracking cookie (currently not supported).


getName

public java.lang.String getName()
Return the name of the session tracking cookie.


setPath

public void setPath(java.lang.String path)
Set the path to use when creating the session tracking cookie.


getPath

public java.lang.String getPath()
Return the path that is set when the session tracking cookie is created.


setMaxAge

public void setMaxAge(java.lang.Integer maxAge)
Set the expiration time for the session cookie.


getMaxAge

public java.lang.Integer getMaxAge()
Return the expiration time for the session cookie.


setDomain

public void setDomain(java.lang.String domain)
Set the domain for which the cookie is valid.


getDomain

public java.lang.String getDomain()
Return the domain for which the cookie is valid.


setComment

public void setComment(java.lang.String comment)
Set the comment that identifies the session cookie.


getComment

public java.lang.String getComment()
Return the URLEncoded form of the comment that identifies the session cookie.


setSecure

public void setSecure(java.lang.String secure)
               throws java.lang.IllegalArgumentException
Set whether the cookie is marked Secure or not.

Parameters:
secure - Valid values are "dynamic", "true" or "false"
Throws:
java.lang.IllegalArgumentException

getSecure

public java.lang.String getSecure()
Return whether the cookie is to be marked Secure or not.

Returns:
"dynamic", "true" or "false"

setHttpOnly

public void setHttpOnly(java.lang.Boolean httpOnly)

getHttpOnly

public java.lang.Boolean getHttpOnly()

toString

public java.lang.String toString()
Return a String representation of this object.

Overrides:
toString in class java.lang.Object


Copyright © 2012 GlassFish Community. All Rights Reserved.