Method Summary |
|
public void | addComponent(Component comp) Adds a component to the internal cache. |
public void | addImage(String key, byte[] imageContents, String mimeType) Adds the image and its mime-type to the UserSession. |
public void | dropSessionObject(String name) Drop a named attribute from the servlet session. |
public void | finalize() This ensures that a cleanup is performed at the time of garbage-collection. |
public void | garbageCollectIdleComponents(int timeOutMinutes) This will perform garbage collection of idle components. |
public Component | getComponent(String compId) Get a Component object based on a componentId from the list of created components that have been created by this user.
Parameters: compId - the componentId. |
public Collection | getComponents() |
public HttpSession | getHttpSession() |
public byte[] | getImageContents(String key) Returns the image for the input key.
The ImageModel may store the image contents into the UserSession (instead of the local filesystem).
The getImage.jsp will then use this method to display the image.
Parameters: key - The key. |
public String | getImageMimeType(String key) Returns the image mime-type for the input key.
The ImageModel may store the image contents into the UserSession (instead of the local filesystem).
The getImage.jsp will then use this method to display the image.
Parameters: key - The key. |
public String | getNextComponentId() Returns a new componentId. |
public String | getSessionId() Getter for property sessionId. |
public Object | getSessionObject(String name) Get a named attribute from the servlet session.
Parameters: name - The attribute name. |
public Object | getUserData() Returns an object that should contain user data useful to the consuming application. |
public String | getUserHostAddr() |
public String | getUserId() Getter for property userId. |
public static UserSession | getUserSession(HttpServletRequest request) Get the UserSession object from the servlet session object. |
public String | getVariation() Getter for property variation. |
public WidgetCache | getWidgetCache(String key) Return an existing WidgetCache for the key.
Create a new WidgetCache if it doesnt already exist.
The key will preferrably be a componentId.
Parameters: key - The key to be used for the widget cache. |
public static boolean | isUserSession(HttpServletRequest request) Is there a user Session? Returns true if there is a user session.
Parameters: request - The HTTP request we are processing. |
public boolean | isValid() Check to see if the UserSession object is valid. |
public void | kill() This function kills the user session object. |
public void | killAllComponents() This function kills all related components. |
public void | removeComponent(Component comp) Remove the component from the internal cache. |
public void | removeImage(String key) Removes the image for the input key. |
public void | setSessionId(String sessionId) Setter for property sessionId. |
public void | setUserData(Object userData) This stores a user reslated object in the frameworks UserSession object. |
public void | setUserId(String userId) Setter for property userId. |
public void | setVariation(String variation) Setter for property variation. |
public void | showInfo() Display all internal Session Info in the System.out stream. |
public void | valueBound(HttpSessionBindingEvent httpSessionBindingEvent) This is invoked, whenever an instance of this class is added to the HttpSession object. |
public void | valueUnbound(HttpSessionBindingEvent httpSessionBindingEvent) This is invoked, whenever an instance of this class is removed from the HttpSession object. |