org.apache.catalina.manager.util

Class SessionUtils

public class SessionUtils extends Object

Utility methods on HttpSessions...

Author: Cédrik LIME

Method Summary
static longgetInactiveTimeForSession(Session in_session)
static longgetTTLForSession(Session in_session)
static longgetUsedTimeForSession(Session in_session)
static LocaleguessLocaleFromSession(Session in_session)
Try to get user locale from the session, if possible.
static LocaleguessLocaleFromSession(HttpSession in_session)
static ObjectguessUserFromSession(Session in_session)
Try to get user from the session, if possible.

Method Detail

getInactiveTimeForSession

public static long getInactiveTimeForSession(Session in_session)

getTTLForSession

public static long getTTLForSession(Session in_session)

getUsedTimeForSession

public static long getUsedTimeForSession(Session in_session)

guessLocaleFromSession

public static Locale guessLocaleFromSession(Session in_session)
Try to get user locale from the session, if possible. IMPLEMENTATION NOTE: this method has explicit support for Tapestry 3, Struts 1.x and Spring JSF check the browser meta tag "accept languages" to choose what langage to display.

Parameters: in_session

Returns: String

guessLocaleFromSession

public static Locale guessLocaleFromSession(HttpSession in_session)

guessUserFromSession

public static Object guessUserFromSession(Session in_session)
Try to get user from the session, if possible.

Parameters: in_session

Returns: Object

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.