Expresso 5-6

com.jcorporate.expresso.core.jsdkapi
Class ServletAPI2_2Session

java.lang.Object
  extended bycom.jcorporate.expresso.core.jsdkapi.ServletAPI2_2Session
All Implemented Interfaces:
APIAwareSession

public class ServletAPI2_2Session
extends Object
implements APIAwareSession


Constructor Summary
ServletAPI2_2Session()
           
 
Method Summary
 Serializable getAttribute(HttpServletRequest req, String code)
          Get an attribute from the session
 Enumeration getAttributeNames(HttpServletRequest req)
          Get all the attribute names from the request
 String getContextPath(HttpServletRequest req)
          Get a sessions's current context path
 String getId(HttpServletRequest req)
          Gets the Session ID
 void invalidate(HttpServletRequest req)
          Invalidates the current user's session
 void removeAttribute(HttpServletRequest req, String code)
          Removes a session attribute
 void setAttribute(HttpServletRequest req, String code, Serializable value)
          Sets a session attribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletAPI2_2Session

public ServletAPI2_2Session()
Method Detail

getAttribute

public Serializable getAttribute(HttpServletRequest req,
                                 String code)
                          throws ServletException
Description copied from interface: APIAwareSession
Get an attribute from the session

Specified by:
getAttribute in interface APIAwareSession
Parameters:
req - The Servlet Request
code - The Attribute 'key'
Returns:
a Serializable Object attribute
Throws:
ServletException

getAttributeNames

public Enumeration getAttributeNames(HttpServletRequest req)
                              throws ServletException
Description copied from interface: APIAwareSession
Get all the attribute names from the request

Specified by:
getAttributeNames in interface APIAwareSession
Parameters:
req - The servlet request object
Returns:
java.util.Enumeration
Throws:
ServletException - upon error

setAttribute

public void setAttribute(HttpServletRequest req,
                         String code,
                         Serializable value)
                  throws ServletException
Sets a session attribute

Specified by:
setAttribute in interface APIAwareSession
Parameters:
req - The servlet request
code - The attribute 'key'
value - The new value to set this attribute value to.
Throws:
ServletException

removeAttribute

public void removeAttribute(HttpServletRequest req,
                            String code)
                     throws ServletException
Removes a session attribute

Specified by:
removeAttribute in interface APIAwareSession
Parameters:
req - The servlet request
code - The attribute 'key' that you wish to removed
Throws:
ServletException - upon error

invalidate

public void invalidate(HttpServletRequest req)
Invalidates the current user's session

Specified by:
invalidate in interface APIAwareSession
Parameters:
req - The servlet request object

getId

public String getId(HttpServletRequest req)
Gets the Session ID

Specified by:
getId in interface APIAwareSession
Parameters:
req - A servlet request object
Returns:
The session ID as a String

getContextPath

public String getContextPath(HttpServletRequest req)
Get a sessions's current context path

Specified by:
getContextPath in interface APIAwareSession
Parameters:
req - a Servlet Request Object
Returns:
The context path

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.