AbstractConnectionCustomizer (c3p0-0.9.5.5 API Documentation)
Date: 2019-12-11

com.mchange.v2.c3p0

## Class AbstractConnectionCustomizer

- java.lang.Object
- - com.mchange.v2.c3p0.AbstractConnectionCustomizer

- All Implemented Interfaces:
    ConnectionCustomizer
  Direct Known Subclasses:
    InitSqlConnectionCustomizer, TestConnectionCustomizer

      public abstract class AbstractConnectionCustomizer
      extends java.lang.Object
      implements ConnectionCustomizer

  An abstract implementation of the ConnectionCustomizer interface in which all methods are no-ops. Just a convenience class since most clients will only need to implement a single method.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractConnectionCustomizer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.util.Map` | `extensionsForToken(java.lang.String parentDataSourceIdentityToken)`
    `void` | `onAcquire(java.sql.Connection c, java.lang.String parentDataSourceIdentityToken)` Called immediately after a Connection is acquired from the underlying database for incorporation into the pool.
    `void` | `onCheckIn(java.sql.Connection c, java.lang.String parentDataSourceIdentityToken)` Called immediately after a Connection is checked in, prior to reincorporation into the pool.
    `void` | `onCheckOut(java.sql.Connection c, java.lang.String parentDataSourceIdentityToken)` Called immediately before a Connection is made available to a client upon checkout.
    `void` | `onDestroy(java.sql.Connection c, java.lang.String parentDataSourceIdentityToken)` Called immediately before a Connection is destroyed after being removed from the pool.

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

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

- - ### Constructor Detail

    - #### AbstractConnectionCustomizer

          public AbstractConnectionCustomizer()

  - ### Method Detail

    - #### extensionsForToken

          protected java.util.Map extensionsForToken(java.lang.String parentDataSourceIdentityToken)

    - #### onAcquire

          public void onAcquire(java.sql.Connection c,
                                java.lang.String parentDataSourceIdentityToken)
                         throws java.lang.Exception

      Description copied from interface: `ConnectionCustomizer`

      Called immediately after a Connection is acquired from the underlying database for incorporation into the pool.

      This method is only called once per Connection. If standard JDBC Connection properties are modified — specifically catalog, holdability, transactionIsolation, readOnly, and typeMap — those modifications will override defaults throughout the Connection's tenure in the pool.

      Specified by:
        `onAcquire` in interface `ConnectionCustomizer`
      Throws:
        `java.lang.Exception`

    - #### onDestroy

          public void onDestroy(java.sql.Connection c,
                                java.lang.String parentDataSourceIdentityToken)
                         throws java.lang.Exception

      Description copied from interface: `ConnectionCustomizer`
      Called immediately before a Connection is destroyed after being removed from the pool.
      Specified by:
        `onDestroy` in interface `ConnectionCustomizer`
      Throws:
        `java.lang.Exception`

    - #### onCheckOut

          public void onCheckOut(java.sql.Connection c,
                                 java.lang.String parentDataSourceIdentityToken)
                          throws java.lang.Exception

      Description copied from interface: `ConnectionCustomizer`
      Called immediately before a Connection is made available to a client upon checkout.
      Specified by:
        `onCheckOut` in interface `ConnectionCustomizer`
      Throws:
        `java.lang.Exception`

    - #### onCheckIn

          public void onCheckIn(java.sql.Connection c,
                                java.lang.String parentDataSourceIdentityToken)
                         throws java.lang.Exception

      Description copied from interface: `ConnectionCustomizer`
      Called immediately after a Connection is checked in, prior to reincorporation into the pool.
      Specified by:
        `onCheckIn` in interface `ConnectionCustomizer`
      Throws:
        `java.lang.Exception`