org.kuali.rice.kim.sesn
Class DistributedSession

java.lang.Object
  extended by org.kuali.rice.kim.sesn.DistributedSession

public class DistributedSession
extends Object

This class is used to interface with the distributed session database. TODO: add clear principals to clearSesn

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
static String DEFAULT_PREFIX
           
 
Constructor Summary
DistributedSession()
           
 
Method Summary
 void addPrincipalToSesn(String DST, String principalID)
          This method appends a principal to an active session
 void clearSesn(String DST)
          This method removes the session
 String createSesn(String principalID)
          This method takes an authenticated principal and generates a Distributed Session Ticket and updates the session database
 String generateDST()
          This method generates a unique Distributed Session Ticket
 List<String> getAuthenticatedPricipals(String DST)
          This method returns the list of principals currently authenticated that are associated with the provided Distributed Session Ticket
 Long getMaxIdleTime(Long oldMaxIdleTime, Date lastAccessDt)
          This method returns the greater of the stored max idle time and time since last access
static String getPrefix()
           
 boolean isSesnValid(String DST)
          This method determines if the Session Ticket is valid.
 boolean isSesnValid(String DST, Map<String,Object> timeoutArgs)
          This method determines if the Session Ticket is valid.
 void setAllowInsertOnTouch(boolean allowInsertOnTouch)
           
 void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
           
static void setPrefix(String prefix)
           
 void setTimeoutHandler(TimeoutHandler timeoutHandler)
           
 void touchSesn(String DST)
          This method updates the session
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_PREFIX

public static final String DEFAULT_PREFIX
See Also:
Constant Field Values
Constructor Detail

DistributedSession

public DistributedSession()
Method Detail

setTimeoutHandler

public void setTimeoutHandler(TimeoutHandler timeoutHandler)
Parameters:
timeoutHandler - the timeoutHandler to set

setJdbcTemplate

public void setJdbcTemplate(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate)
Parameters:
jdbcTemplate - the jdbcTemplate to set

isSesnValid

public boolean isSesnValid(String DST)
This method determines if the Session Ticket is valid.

Parameters:
DST - - the Distributed Session Ticket
Returns:
true if the session is valid

isSesnValid

public boolean isSesnValid(String DST,
                           Map<String,Object> timeoutArgs)
This method determines if the Session Ticket is valid.

Parameters:
DST - - the Distributed Session Ticket
timoutArgs - - Additional information on which to base timeouts
Returns:
true if the session is valid

getAuthenticatedPricipals

public List<String> getAuthenticatedPricipals(String DST)
This method returns the list of principals currently authenticated that are associated with the provided Distributed Session Ticket

Parameters:
DST - - the Distributed Session Ticket
Returns:
the List of authenticated principals

clearSesn

public void clearSesn(String DST)
This method removes the session

Parameters:
DST - - the Distributed Session Ticket

createSesn

public String createSesn(String principalID)
This method takes an authenticated principal and generates a Distributed Session Ticket and updates the session database

Parameters:
principalID - - the id of the authenticated entity
Returns:
DST - the Distributed Session Ticket

generateDST

public String generateDST()
This method generates a unique Distributed Session Ticket

Returns:
DST - the Distributed Session Ticket

touchSesn

public void touchSesn(String DST)
This method updates the session

Parameters:
DST - - the Distributed Session Ticket

getMaxIdleTime

public Long getMaxIdleTime(Long oldMaxIdleTime,
                           Date lastAccessDt)
This method returns the greater of the stored max idle time and time since last access

Parameters:
oldMaxIdleTime - - the previous max idle time
lastAccessDt - - the timestamp of last access
Returns:
the max idle time

addPrincipalToSesn

public void addPrincipalToSesn(String DST,
                               String principalID)
This method appends a principal to an active session

Parameters:
DST - - the Distributed Session Ticket
principalID - - the id of the authenticated entity

getPrefix

public static String getPrefix()
Returns:
the prefix

setPrefix

public static void setPrefix(String prefix)
Parameters:
prefix - the prefix to set

setAllowInsertOnTouch

public void setAllowInsertOnTouch(boolean allowInsertOnTouch)
Parameters:
allowInsertOnTouch - the allowInsertOnTouch to set


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.