org.logicalcobwebs.proxool

Class CompositeConnectionListener

Implemented Interfaces:
ConnectionListenerIF, ListenerContainerIF

public class CompositeConnectionListener
extends AbstractListenerContainer
implements ConnectionListenerIF

A ConnectionListenerIF that keeps a list of ConnectionListenerIFs and notifies them in a thread safe manner. It also implements ListenerContainerIF which provides methods for adding and removing listeners.
Version:
$Revision: 1.8 $, $Date: 2007/01/25 23:38:24 $
Authors:
Christian Nedregaard (christian_nedregaard@email.com)
$Author: billhorsman $ (current maintainer)
Since:
Proxool 0.7

Fields inherited from interface org.logicalcobwebs.proxool.ConnectionListenerIF

FATAL_SQL_EXCEPTION_DETECTED, HOUSE_KEEPER_TEST_FAIL, MANUAL_EXPIRY, MAXIMUM_ACTIVE_TIME_EXPIRED, MAXIMUM_CONNECTION_LIFETIME_EXCEEDED, RESET_FAIL, SHUTDOWN, VALIDATION_FAIL

Method Summary

void
onBirth(Connection connection)
void
onDeath(Connection connection, int reasonCode)
void
onExecute(String command, long elapsedTime)
void
onFail(String command, Exception exception)

Methods inherited from class org.logicalcobwebs.proxool.util.AbstractListenerContainer

addListener, getListeners, isEmpty, removeListener

Method Details

onBirth

public void onBirth(Connection connection)
            throws SQLException
Specified by:
onBirth in interface ConnectionListenerIF

onDeath

public void onDeath(Connection connection,
                    int reasonCode)
            throws SQLException
Specified by:
onDeath in interface ConnectionListenerIF
See Also:
ConnectionListenerIF.onDeath(java.sql.Connection, int)

onExecute

public void onExecute(String command,
                      long elapsedTime)
Specified by:
onExecute in interface ConnectionListenerIF

onFail

public void onFail(String command,
                   Exception exception)
Specified by:
onFail in interface ConnectionListenerIF