Class SessionUtils
java.lang.Object
org.apache.catalina.manager.util.SessionUtils
Utility methods on HttpSessions.
-
Method Summary
Modifier and TypeMethodDescriptionstatic longgetInactiveTimeForSession(Session in_session) Returns the time in milliseconds since the session was last accessed.static longgetTTLForSession(Session in_session) Returns the remaining time-to-live for the session in milliseconds.static longgetUsedTimeForSession(Session in_session) Returns the time in milliseconds that the session has been active.static LocaleguessLocaleFromSession(HttpSession in_session) Try to get user locale from the HttpSession, if possible.static LocaleguessLocaleFromSession(Session in_session) Try to get user locale from the session, if possible.static ObjectguessUserFromSession(Session in_session) Try to get user from the session, if possible.
-
Method Details
-
guessLocaleFromSession
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 language to display.- Parameters:
in_session- The session- Returns:
- the locale
-
guessLocaleFromSession
Try to get user locale from the HttpSession, if possible.- Parameters:
in_session- The HTTP session- Returns:
- the locale, or
nullif it cannot be determined
-
guessUserFromSession
-
getUsedTimeForSession
Returns the time in milliseconds that the session has been active.- Parameters:
in_session- The session- Returns:
- the active time in milliseconds, or -1 if the session is invalidated
-
getTTLForSession
Returns the remaining time-to-live for the session in milliseconds.- Parameters:
in_session- The session- Returns:
- the remaining TTL in milliseconds, or -1 if the session is invalidated
-
getInactiveTimeForSession
Returns the time in milliseconds since the session was last accessed.- Parameters:
in_session- The session- Returns:
- the inactive time in milliseconds, or -1 if the session is invalidated
-