Save This Page
Home » struts-2.0.11.2-src » org.apache » struts2 » dispatcher » [javadoc | source]
org.apache.struts2.dispatcher
public class: SessionMap [javadoc | source]
java.lang.Object
   java.util.AbstractMap
      org.apache.struts2.dispatcher.SessionMap

All Implemented Interfaces:
    Serializable, Map

A simple implementation of the java.util.Map interface to handle a collection of HTTP session attributes. The #entrySet() method enumerates over all session attributes and creates a Set of entries. Note, this will occur lazily - only when the entry set is asked for.
Field Summary
protected  HttpSession session     
protected  Set entries     
protected  HttpServletRequest request     
Constructor:
 public SessionMap(HttpServletRequest request) 
    Creates a new session map given a http servlet request. Note, ths enumeration of request attributes will occur when the map entries are asked for.
    Parameters:
    request - the http servlet request object.
Method from org.apache.struts2.dispatcher.SessionMap Summary:
clear,   entrySet,   get,   invalidate,   put,   remove
Methods from java.util.AbstractMap:
clear,   containsKey,   containsValue,   entrySet,   equals,   get,   hashCode,   isEmpty,   keySet,   put,   putAll,   remove,   size,   toString,   values
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.struts2.dispatcher.SessionMap Detail:
 public  void clear() 
    Removes all attributes from the session as well as clears entries in this map.
 public Set entrySet() 
    Returns a Set of attributes from the http session.
 public Object get(Object key) 
    Returns the session attribute associated with the given key or null if it doesn't exist.
 public  void invalidate() 
    Invalidate the http session.
 public Object put(Object key,
    Object value) 
    Saves an attribute in the session.
 public Object remove(Object key) 
    Removes the specified session attribute.