public final class ExceptionListenerDispatcher extends java.lang.Object implements java.lang.Iterable<ExceptionListener>, ExceptionListener
ExceptionListener.
This implementation uses WeakReference (or more specifically WeakHashMap. Therefor listeners
without a strong reference may be removed an no longer notified at any time.
| Constructor and Description |
|---|
ExceptionListenerDispatcher(java.lang.Object source) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ExceptionListener listener)
Adds the supplied listener to this dispatcher.
|
void |
errorOccurred(java.lang.Object source,
java.sql.SQLException exception)
Notify about a SQLException
|
void |
errorOccurred(java.sql.SQLException exception) |
boolean |
isShutdown() |
java.util.Iterator<ExceptionListener> |
iterator() |
void |
removeAllListeners()
Removes all listeners from this dispatcher.
|
void |
removeListener(ExceptionListener listener)
Removes the supplied listener from this dispatcher.
|
void |
shutdown()
Shuts down this dispatcher and removes all listeners.
|
public ExceptionListenerDispatcher(java.lang.Object source)
public void errorOccurred(java.lang.Object source,
java.sql.SQLException exception)
ExceptionListenererrorOccurred in interface ExceptionListenersource - The source of the event; note for caller: this should be the object this listener is registered at.exception - error that occurred.public void errorOccurred(java.sql.SQLException exception)
public void addListener(ExceptionListener listener)
A call to this method has no effect after shutdown() has been called.
listener - Listener objectpublic void removeListener(ExceptionListener listener)
listener - Listener objectpublic void removeAllListeners()
public void shutdown()
After shutdown calls to addListener(ExceptionListener) are ignored.
public boolean isShutdown()
true when this dispatcher has been shut down.public java.util.Iterator<ExceptionListener> iterator()
iterator in interface java.lang.Iterable<ExceptionListener>Copyright © 2001-2023 Jaybird (Firebird JDBC) team. All rights reserved.