Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.ng.listeners
Class DatabaseListenerDispatcher
java.lang.Object
org.firebirdsql.gds.ng.listeners.AbstractListenerDispatcher<DatabaseListener>
org.firebirdsql.gds.ng.listeners.DatabaseListenerDispatcher
- All Implemented Interfaces:
Iterable<DatabaseListener>
,DatabaseListener
public final class DatabaseListenerDispatcher
extends AbstractListenerDispatcher<DatabaseListener>
implements DatabaseListener
Dispatcher to maintain and notify other
DatabaseListener
.- Since:
- 3.0
- Author:
- Mark Rotteveel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
detached
(FbDatabase database) Called when thedatabase
connection has been detachedvoid
detaching
(FbDatabase database) Called before thedatabase
will be detached.protected void
void
warningReceived
(FbDatabase database, SQLWarning warning) Called when a warning was received for thedatabase
connection.Methods inherited from class org.firebirdsql.gds.ng.listeners.AbstractListenerDispatcher
addListener, addWeakListener, isShutdown, iterator, notify, removeAllListeners, removeListener, shutdown
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
DatabaseListenerDispatcher
public DatabaseListenerDispatcher()
-
-
Method Details
-
detaching
Description copied from interface:DatabaseListener
Called before thedatabase
will be detached.This event is intended for cleanup action, implementer should take care that no exceptions are thrown from this method.
- Specified by:
detaching
in interfaceDatabaseListener
- Parameters:
database
- The database object that is detaching
-
detached
Description copied from interface:DatabaseListener
Called when thedatabase
connection has been detached- Specified by:
detached
in interfaceDatabaseListener
- Parameters:
database
- The database object that was detached
-
warningReceived
Description copied from interface:DatabaseListener
Called when a warning was received for thedatabase
connection.In implementation it is possible that some warnings are not sent to listeners on the database, but only to listeners on specific connection derived objects (like an
FbStatement
implementation).- Specified by:
warningReceived
in interfaceDatabaseListener
- Parameters:
database
- Database receiving the warningwarning
- Warning
-
logError
- Specified by:
logError
in classAbstractListenerDispatcher<DatabaseListener>
-