Package org.firebirdsql.gds.ng.listeners

## Class DefaultDatabaseListener

- java.lang.Object
- - org.firebirdsql.gds.ng.listeners.DefaultDatabaseListener

- All Implemented Interfaces:
    `DatabaseListener`

      public class DefaultDatabaseListener
      extends java.lang.Object
      implements DatabaseListener

  Default implementation of `DatabaseListener` where all implemented methods do nothing.
  Since:
    3.0
  Author:
    Mark Rotteveel

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `DefaultDatabaseListener()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `detached​(FbDatabase database)` | Called when the `database` connection has been detached
    `void` | `detaching​(FbDatabase database)` | Called before the `database` will be detached.
    `void` | `warningReceived​(FbDatabase database, java.sql.SQLWarning warning)` | Called when a warning was received for the `database` connection.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultDatabaseListener

          public DefaultDatabaseListener()

  - ### Method Detail

    - #### detaching

          public void detaching​(FbDatabase database)

      Description copied from interface: `DatabaseListener`
      Called before the `database` 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 interface `DatabaseListener`
      Parameters:
        `database` - The database object that is detaching

    - #### detached

          public void detached​(FbDatabase database)

      Description copied from interface: `DatabaseListener`
      Called when the `database` connection has been detached
      Specified by:
        `detached` in interface `DatabaseListener`
      Parameters:
        `database` - The database object that was detached

    - #### warningReceived

          public void warningReceived​(FbDatabase database,
                                      java.sql.SQLWarning warning)

      Description copied from interface: `DatabaseListener`
      Called when a warning was received for the `database` 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 interface `DatabaseListener`
      Parameters:
        `database` - Database receiving the warning
        `warning` - Warning