PooledConnection (jTDS API)
Date: 2013-06-08

net.sourceforge.jtds.jdbcx

## Class PooledConnection

- java.lang.Object
- - net.sourceforge.jtds.jdbcx.PooledConnection

- All Implemented Interfaces:
    javax.sql.PooledConnection
  Direct Known Subclasses:
    JtdsXAConnection

      public class PooledConnection
      extends java.lang.Object
      implements javax.sql.PooledConnection

  jTDS implementation of the `PooledConnection` interface.
  Version:
    $Id: PooledConnection.java,v 1.11.6.3 2009-12-30 08:45:34 ickzon Exp $

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected java.sql.Connection` | `connection`
    `private java.util.ArrayList` | `listeners`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PooledConnection(java.sql.Connection connection)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addConnectionEventListener(javax.sql.ConnectionEventListener listener)` Adds the specified listener to the list.
    `void` | `addStatementEventListener(javax.sql.StatementEventListener listener)`
    `void` | `close()` Closes the database connection.
    `void` | `fireConnectionEvent(boolean closed, java.sql.SQLException sqlException)` Fires a new connection event on all listeners.
    `java.sql.Connection` | `getConnection()` Returns a ConnectionProxy.
    `void` | `removeConnectionEventListener(javax.sql.ConnectionEventListener listener)` Removes the specified listener from the list.
    `void` | `removeStatementEventListener(javax.sql.StatementEventListener listener)`

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

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

- - ### Field Detail

    - #### listeners

          private java.util.ArrayList listeners

    - #### connection

          protected java.sql.Connection connection

  - ### Constructor Detail

    - #### PooledConnection

          public PooledConnection(java.sql.Connection connection)

  - ### Method Detail

    - #### addConnectionEventListener

          public void addConnectionEventListener(javax.sql.ConnectionEventListener listener)

      Adds the specified listener to the list.
      Specified by:
        `addConnectionEventListener` in interface `javax.sql.PooledConnection`
      See Also:
        `fireConnectionEvent(boolean, java.sql.SQLException)`, `removeConnectionEventListener(javax.sql.ConnectionEventListener)`

    - #### close

          public void close()
                     throws java.sql.SQLException

      Closes the database connection.
      Specified by:
        `close` in interface `javax.sql.PooledConnection`
      Throws:
        `java.sql.SQLException` - if an error occurs

    - #### fireConnectionEvent

          public void fireConnectionEvent(boolean closed,
                                 java.sql.SQLException sqlException)

      Fires a new connection event on all listeners.
      Parameters:
        `closed` - `true` if `close` has been called on the connection; `false` if the `sqlException` represents an error where the connection may not longer be used.
        `sqlException` - the SQLException to pass to the listeners

    - #### getConnection

          public java.sql.Connection getConnection()
                                            throws java.sql.SQLException

      Returns a ConnectionProxy.
      Specified by:
        `getConnection` in interface `javax.sql.PooledConnection`
      Throws:
        `java.sql.SQLException` - if an error occurs

    - #### removeConnectionEventListener

          public void removeConnectionEventListener(javax.sql.ConnectionEventListener listener)

      Removes the specified listener from the list.
      Specified by:
        `removeConnectionEventListener` in interface `javax.sql.PooledConnection`
      See Also:
        `addConnectionEventListener(javax.sql.ConnectionEventListener)`, `fireConnectionEvent(boolean, java.sql.SQLException)`

    - #### addStatementEventListener

          public void addStatementEventListener(javax.sql.StatementEventListener listener)

      Specified by:
        `addStatementEventListener` in interface `javax.sql.PooledConnection`

    - #### removeStatementEventListener

          public void removeStatementEventListener(javax.sql.StatementEventListener listener)

      Specified by:
        `removeStatementEventListener` in interface `javax.sql.PooledConnection`

Generated on June 8 2013