de.dante.extex.interpreter.observer.error
Class ErrorObserverList

java.lang.Object
  extended byde.dante.extex.interpreter.observer.error.ErrorObserverList
All Implemented Interfaces:
ErrorObserver

public final class ErrorObserverList
extends java.lang.Object
implements ErrorObserver

This class provides a type-safe list of observers for the error event.

Version:
$Revision: 1.3 $
Author:
Gerd Neugebauer

Constructor Summary
ErrorObserverList()
           
 
Method Summary
 void add(ErrorObserver observer)
          Add an observer to the list.
static ErrorObserver register(ErrorObserver list, ErrorObserver observer)
          Take a list and add an observer.
 void update(java.lang.Exception e)
          Invoke all observers on the list to inform them of the error occured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorObserverList

public ErrorObserverList()
Method Detail

register

public static ErrorObserver register(ErrorObserver list,
                                     ErrorObserver observer)
Take a list and add an observer. If the list is null then a new one is created.

Parameters:
list - the input list or null
observer - the observer to add
Returns:
the input list or a new one with the observer added

add

public void add(ErrorObserver observer)
Add an observer to the list.

Parameters:
observer - the observer to add to the list

update

public void update(java.lang.Exception e)
Invoke all observers on the list to inform them of the error occured.

Specified by:
update in interface ErrorObserver
Parameters:
e - the exception describing the error condition
See Also:
ErrorObserver.update( java.lang.Exception)