com.antelmann.mgmt
Class LoginEvent
java.lang.Object
java.util.EventObject
com.antelmann.mgmt.LoginEvent
- All Implemented Interfaces:
- Serializable
public class LoginEvent
- extends EventObject
- Author:
- Holger Antelmann
- See Also:
- Serialized Form
|
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 |
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
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