bb.servlet
Class HttpSessionUtil

java.lang.Object
  extended by bb.servlet.HttpSessionUtil

public final class HttpSessionUtil
extends Object

Provides static utility methods for dealing with HttpSessions.

This class is multithread safe: it is stateless.

Author:
Brent Boyer
See Also:
HttpSession

Constructor Summary
private HttpSessionUtil()
          This sole private constructor suppresses the default (public) constructor, ensuring non-instantiability outside of this class.
 
Method Summary
static String getCreationTime(HttpSession session)
          Returns a String description of the supplied HttpSession's creation time.
static String toString(HttpSession session)
          Returns a String description of the supplied HttpSession.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpSessionUtil

private HttpSessionUtil()
This sole private constructor suppresses the default (public) constructor, ensuring non-instantiability outside of this class.

Method Detail

toString

public static String toString(HttpSession session)
                       throws IllegalArgumentException
Returns a String description of the supplied HttpSession.

Throws:
IllegalArgumentException - if session is null

getCreationTime

public static String getCreationTime(HttpSession session)
                              throws IllegalArgumentException
Returns a String description of the supplied HttpSession's creation time. If the HttpSession has already been invalidated, this method catches the IllegalStateException which will be thrown and returns a message stating this.

Throws:
IllegalArgumentException - if session is null