com.mtgi.analytics.servlet
Class SpringSessionContext

java.lang.Object
  extended by com.mtgi.analytics.servlet.SpringSessionContext
All Implemented Interfaces:
SessionContext

public class SpringSessionContext
extends Object
implements SessionContext

The default SessionContext implementation for web applications, which uses Spring request context to lookup user name and session ID. Requires that the spring RequestContextListener is registered in the web application.


Constructor Summary
SpringSessionContext()
           
 
Method Summary
 String getContextSessionId()
          If the calling thread is currently working on an authenticated session, return the session ID.
 String getContextUserId()
          get the user ID currently associated with the calling thread, if any
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringSessionContext

public SpringSessionContext()
Method Detail

getContextSessionId

public String getContextSessionId()
Description copied from interface: SessionContext
If the calling thread is currently working on an authenticated session, return the session ID. Otherwise return null.

Specified by:
getContextSessionId in interface SessionContext

getContextUserId

public String getContextUserId()
Description copied from interface: SessionContext
get the user ID currently associated with the calling thread, if any

Specified by:
getContextUserId in interface SessionContext