org.progeeks.util
Class ErrorDelegate

java.lang.Object
  extended by org.progeeks.util.ErrorDelegate

public class ErrorDelegate
extends java.lang.Object

Delegate for managing error listeners and the delivering of error events.

Version:
$Revision: 1.2 $
Author:
Paul Speed

Constructor Summary
ErrorDelegate()
          Creates a new ErrorDelegate that will use itself as the source.
ErrorDelegate(java.lang.Object source)
          Creates a new ErrorDelegate that will use the specified source object when delivering error events.
 
Method Summary
 void addErrorListener(ErrorListener listener)
          Adds the specified error listener to be notified whenever an error event happens.
 void error(ErrorInfo error)
          Sends the error information to the current listeners.
 java.lang.Object getSource()
          Returns the source object used when delivering events.
 void removeErrorListener(ErrorListener listener)
          Removes a previously registered error listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorDelegate

public ErrorDelegate()
Creates a new ErrorDelegate that will use itself as the source. This is useful for subclassing in cases where it is available.


ErrorDelegate

public ErrorDelegate(java.lang.Object source)
Creates a new ErrorDelegate that will use the specified source object when delivering error events.

Method Detail

getSource

public java.lang.Object getSource()
Returns the source object used when delivering events.


addErrorListener

public void addErrorListener(ErrorListener listener)
Adds the specified error listener to be notified whenever an error event happens.


removeErrorListener

public void removeErrorListener(ErrorListener listener)
Removes a previously registered error listener.


error

public void error(ErrorInfo error)
Sends the error information to the current listeners.



Copyright © 2002-2003 Paul Speed. All Rights Reserved.