javawebparts.session
Class SessionHelpers

java.lang.Object
  |
  +--javawebparts.session.SessionHelpers

public final class SessionHelpers
extends java.lang.Object

This class contains static methods that are too small to warrant their own class. General session-related utility methods.

Author:
Frank W. Zammetti

Field Summary
private static org.apache.commons.logging.Log log
          Log instance.
 
Constructor Summary
private SessionHelpers()
          This is a utility class, so we want a private noarg constructor so instances cannot be created.
 
Method Summary
static java.util.Map getSessionAttributes(javax.servlet.http.HttpSession session)
          This method will return a Map that can be displayed which contains all session attributes.
static void logSessionAttributes(javax.servlet.http.HttpSession session)
          This method is a convenience method that dumps all attributes to the log.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log
Log instance.

Constructor Detail

SessionHelpers

private SessionHelpers()
This is a utility class, so we want a private noarg constructor so instances cannot be created.

Method Detail

logSessionAttributes

public static void logSessionAttributes(javax.servlet.http.HttpSession session)
This method is a convenience method that dumps all attributes to the log.

Parameters:
session - A valid HTTPSession object.

getSessionAttributes

public static java.util.Map getSessionAttributes(javax.servlet.http.HttpSession session)
This method will return a Map that can be displayed which contains all session attributes.

Parameters:
session - A valid HttpSession object.
Returns:
A Map of all the attributes of the session object. Returns null if session is null.


Copyright © 2005 Frank W. Zammetti