[Building Sakai] Post login event listener

Jim Eng jimeng at umich.edu
Mon Aug 8 07:22:10 PDT 2011


Hi David,

Actually, the interface you implement is java.util.Observer:

	http://download.oracle.com/javase/6/docs/api/index.html?overview-summary.html

You register your Observer with EventTrackingService:

	http://source.sakaiproject.org/release/kernel/1.0.13/apidocs/index.html

You can register an Observer as a "local" observer, which means that your update() method will be called only on the server where the event occurred.  Or you can register an Observer to listen to all events regardless of where in the cluster they occur.  

Your update() method will get two params.  The second will be an event object. You should very very quickly check whether you are interested in the event.  If not, you should return ASAP.  Of course, you should return ASAP anyway. 

HTH.

Jim    

On Aug 8, 2011, at 10:09 AM, David Wafula wrote:

> Could a kind soul point me to where i could get started with event listeners..i am needing to write a login listener. I was imagining an interface somewhere that i could implement like below:
> 
> 
> interface LoginListener{
> 
> public void loginSuccessful();
> 
> public void loginFail();
> }
> 
> -- 
> David Wafula
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"



More information about the sakai-dev mailing list