jtge.engine.security
Class LoginObserver

java.lang.Object
  extended byjtge.engine.security.LoginObserver
All Implemented Interfaces:
ILoginObserver

public class LoginObserver
extends java.lang.Object
implements ILoginObserver

Adapts user login/logout notifications.

This class sends a login result to a given consumer when a new user logs in.

It also sends to the output for this new user a login update listing all current logged in users.

A logout result is sent out when a user logs off.

Version:
$Revision: 1.1 $ $Date: 2005/09/07 23:34:37 $
Author:
Mathieu Champlon

Constructor Summary
LoginObserver(IConsumer consumer)
          Create a login context.
 
Method Summary
 void login(IUser user, IConsumer consumer)
          Notify a user logging in.
 void logout(IUser user)
          Notify a user logging out.
 void register(ILoginView view)
          Register a view to receive login events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginObserver

public LoginObserver(IConsumer consumer)
Create a login context.

Parameters:
consumer - the update/result output
Method Detail

register

public final void register(ILoginView view)
Register a view to receive login events.

Parameters:
view - the view to register

login

public final void login(IUser user,
                        IConsumer consumer)
Notify a user logging in.

Specified by:
login in interface ILoginObserver
Parameters:
user - the user logging in
consumer - the associated consumer

logout

public final void logout(IUser user)
Notify a user logging out.

Specified by:
logout in interface ILoginObserver
Parameters:
user - the user logging out


Copyright © 2003-2005 . All Rights Reserved.