hu.elte.tribus.services
Class HashMapUserTracker

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by hu.elte.tribus.services.HashMapUserTracker
All Implemented Interfaces:
UserTracker, org.springframework.beans.factory.InitializingBean

public class HashMapUserTracker
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements UserTracker

Very simple implementation, that fits the need of a single-server environment using a HashMap or even a clustered environment with a jcache implementation with a simple factory bean. Which is of course beyound scope for a 48-hours welding contest.

Author:
kocka

Constructor Summary
HashMapUserTracker()
           
 
Method Summary
 java.util.Map getMap()
           
 UserDao getUserDao()
           
 java.util.List listOfOnlineUsers()
          List the users using the site atm.
 void setMap(java.util.Map map)
           
 void setUserDao(UserDao userDao)
           
 void userLoggedIn(java.lang.String username)
          Should be called if the user signs in or returns to the site.
 void userLoggedOut(java.lang.String username)
          Should be called if the user signs out or its session expires.
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HashMapUserTracker

public HashMapUserTracker()
Method Detail

userLoggedIn

public void userLoggedIn(java.lang.String username)
Description copied from interface: UserTracker
Should be called if the user signs in or returns to the site.

Specified by:
userLoggedIn in interface UserTracker

userLoggedOut

public void userLoggedOut(java.lang.String username)
Description copied from interface: UserTracker
Should be called if the user signs out or its session expires.

Specified by:
userLoggedOut in interface UserTracker

getMap

public java.util.Map getMap()

setMap

public void setMap(java.util.Map map)

listOfOnlineUsers

public java.util.List listOfOnlineUsers()
Description copied from interface: UserTracker
List the users using the site atm.

Specified by:
listOfOnlineUsers in interface UserTracker
Returns:
list of OnlineUserBeans

getUserDao

public UserDao getUserDao()

setUserDao

public void setUserDao(UserDao userDao)


Copyright © 2006-2007. All Rights Reserved.