portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mikko Wuokko <mikko.wuo...@evtek.fi>
Subject Ajax api enhancements
Date Tue, 17 Apr 2007 11:03:27 GMT
Hi.

I've made some enhancements to the AJAX Api to fit our needs and thought 
if you would be interested of them as well. There's two API actions, one 
to get the information of the current logged in user and the second one 
to get information of all the logged in users and optionally offline 
users and number of guest sessions active. The first one could be used 
for example to pass login information for an AJAX enabled portlet and 
the second one for users statistics and monitoring. We have a simple 
portlet building which would show a realtime status of the online users.

The online/offline user statistics api can be easily secured to be used 
for admin only by setting the RoleSecurityBehavior. Data that it will 
produce for online users is:

- status (online/offline)
- username
- ipaddress
- number of sessios
- all the userinfo there is (first name, last name,...)

For offline user it will be the same except no sesssion number as it 
would be zero anyway.

I've made some changes to the PortalStatistics(Impl) and UserStats(Impl) 
to store also the ip address and and it will now use that to distinguish 
the sessions of a user from another. In other words, the same user 
connecting from two different ip will be shown as separate users. If 
used just one ip, but two browsers (sessions) the sessions value will be 
increased. After some testing it would seem to work :D. Also getting the 
number guest sessions or any sessions needed a new method to 
PortalSessionManager.

Does this make any sense or attach your interest?

Regards,

Mikko

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message