Holger's
Java API

com.antelmann.mgmt
Class LoginEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.antelmann.mgmt.LoginEvent
All Implemented Interfaces:
Serializable

public class LoginEvent
extends EventObject

Author:
Holger Antelmann
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
LoginEvent(Object source, User user, Exception exception)
          if the user is null and the exception is null, the login was canceled; both (user and exception) cannot be non-null at the same them.
 
Method Summary
 Exception getException()
          returns the reason for a failed login as an exception (possible causes: incorrect credentials were supplied, or a database related exception was thrown).
 User getUser()
          if the return value is null, this represents a failed login
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LoginEvent

public LoginEvent(Object source,
                  User user,
                  Exception exception)
           throws IllegalArgumentException
if the user is null and the exception is null, the login was canceled; both (user and exception) cannot be non-null at the same them. If the exception is non-null, it must be either a DatabaseException or a FailedLoginException.

Throws:
IllegalArgumentException
See Also:
DatabaseException, FailedLoginException
Method Detail

getUser

public User getUser()
if the return value is null, this represents a failed login


getException

public Exception getException()
returns the reason for a failed login as an exception (possible causes: incorrect credentials were supplied, or a database related exception was thrown).

Returns:
either a DatabaseException or a LoginFailedException
See Also:
DatabaseException, FailedLoginException


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads