javax.xml.xquery

## Interface XQConnectionEventListener

-     public interface XQConnectionEventListener

  An object that registers to be notified of events generated by a `PooledXQConnection` object.

  The `XQConnectionEventListener` interface is implemented by a connection pooling component. A connection pooling component will usually be provided by an XQJ vendor or by another system software vendor. An XQJ implementation notifies an `XQConnectionEventListener` object when an application is finished using a pooled connection with which the listener has registered. The notification occurs after the application calls the method `close` on its representation of a `PooledXQConnection` object. An `XQConnectionEventListener` is also notified when a connection error occurs due to the fact that the `PooledXQConnection` is unfit for future use - the network connection to the XML datasource died, for example. The listener is notified by the XQJ implementation just before it throws an `XQException` to the application using the `PooledXQConnection` object.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `connectionClosed(XQConnectionEvent event)` Notifies this `XQConnectionEventListener` that the application has called the method `close` on its representation of a pooled connection.
    `void` | `connectionErrorOccurred(XQConnectionEvent event)` Notifies this `XQConnectionEventListener` that a fatal error has occurred and the pooled connection can no longer be used.

- - ### Method Detail

    - #### connectionClosed

          void connectionClosed(XQConnectionEvent event)

      Notifies this `XQConnectionEventListener` that the application has called the method `close` on its representation of a pooled connection.
      Parameters:
        `event` - an event object describing the source of the event

    - #### connectionErrorOccurred

          void connectionErrorOccurred(XQConnectionEvent event)

      Notifies this `XQConnectionEventListener` that a fatal error has occurred and the pooled connection can no longer be used. The XQJ implementation makes this notification just before it throws the application the `XQException` contained in the given `XQConnectionEvent` object.
      Parameters:
        `event` - an event object describing the source of the event and containing the `XQException` that the XQJ implementation will throw

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.