org.openuat.authentication
Class AuthenticationEventSender

java.lang.Object
  extended by org.openuat.authentication.AuthenticationEventSender
Direct Known Subclasses:
CKPOverUDP, DHOverTCPWithVerification, DongleProtocolHandler, HostProtocolHandler, HostServerSocket

public abstract class AuthenticationEventSender
extends java.lang.Object

This is an abstract class to encapsulate the notion of an authentication event sender. The basic capability is to send events about the the progress of the respective authentication, i.e. AuthenticationSuccess, AuthenticationFailure and AuthenticationProgress events.

Version:
1.0
Author:
Rene Mayrhofer

Field Summary
protected  java.util.LinkedList eventsHandlers
          The list of listeners that are notified of authentication events.
 
Constructor Summary
AuthenticationEventSender()
           
 
Method Summary
 void addAuthenticationProgressHandler(AuthenticationProgressHandler h)
          Register a listener for receiving events.
protected  void raiseAuthenticationFailureEvent(java.lang.Object remote, java.lang.Exception e, java.lang.String msg)
          Helper method for sending an AuthenticationFailure event to all registered listeners (if any).
protected  void raiseAuthenticationProgressEvent(java.lang.Object remote, int cur, int max, java.lang.String msg)
          Helper method for sending an AuthenticationProgress event to all registered listeners (if any).
protected  void raiseAuthenticationSuccessEvent(java.lang.Object remote, java.lang.Object result)
          Helper method for sending an AuthenticationSuccess event to all registered listeners (if any).
 boolean removeAuthenticationProgressHandler(AuthenticationProgressHandler h)
          De-register a listener for receiving events.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eventsHandlers

protected java.util.LinkedList eventsHandlers
The list of listeners that are notified of authentication events.

Constructor Detail

AuthenticationEventSender

public AuthenticationEventSender()
Method Detail

addAuthenticationProgressHandler

public void addAuthenticationProgressHandler(AuthenticationProgressHandler h)
Register a listener for receiving events.


removeAuthenticationProgressHandler

public boolean removeAuthenticationProgressHandler(AuthenticationProgressHandler h)
De-register a listener for receiving events.


raiseAuthenticationSuccessEvent

protected void raiseAuthenticationSuccessEvent(java.lang.Object remote,
                                               java.lang.Object result)
Helper method for sending an AuthenticationSuccess event to all registered listeners (if any).


raiseAuthenticationFailureEvent

protected void raiseAuthenticationFailureEvent(java.lang.Object remote,
                                               java.lang.Exception e,
                                               java.lang.String msg)
Helper method for sending an AuthenticationFailure event to all registered listeners (if any).


raiseAuthenticationProgressEvent

protected void raiseAuthenticationProgressEvent(java.lang.Object remote,
                                                int cur,
                                                int max,
                                                java.lang.String msg)
Helper method for sending an AuthenticationProgress event to all registered listeners (if any).



2005-2006, Rene Mayrhofer.