org.firebirdsql.gds.ng.listeners

## Class ServiceListenerDispatcher

- java.lang.Object
- - org.firebirdsql.gds.ng.listeners.AbstractListenerDispatcher<ServiceListener>
  - - org.firebirdsql.gds.ng.listeners.ServiceListenerDispatcher

- All Implemented Interfaces:
    java.lang.Iterable<ServiceListener>, ServiceListener

      public final class ServiceListenerDispatcher
      extends AbstractListenerDispatcher<ServiceListener>
      implements ServiceListener

  Author:
    Mark Rotteveel

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServiceListenerDispatcher()`

  - ### Method Summary

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

    - ### Methods inherited from class org.firebirdsql.gds.ng.listeners.AbstractListenerDispatcher

      `addListener, addWeakListener, isShutdown, iterator, removeAllListeners, removeListener, shutdown`

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

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

- - ### Constructor Detail

    - #### ServiceListenerDispatcher

          public ServiceListenerDispatcher()

  - ### Method Detail

    - #### detaching

          public void detaching(FbService service)

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

    - #### detached

          public void detached(FbService service)

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

    - #### warningReceived

          public void warningReceived(FbService service,
                             java.sql.SQLWarning warning)

      Description copied from interface: `ServiceListener`
      Called when a warning was received for the `service` 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.

      Specified by:
        `warningReceived` in interface `ServiceListener`
      Parameters:
        `service` - service receiving the warning
        `warning` - Warning

Copyright © 2001-2021 Jaybird (Firebird JDBC/JCA) team. All rights reserved.