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.6 $, $Date: 2006/01/18 14:40:01 $
Authors:
Christian Nedregaard (christian_nedregaard@email.com)
$Author: billhorsman $ (current maintainer)
Since:
Proxool 0.7

Method Summary

void
onBirth(Connection connection)
void
onDeath(Connection connection)
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)
            throws SQLException
Specified by:
onDeath in interface ConnectionListenerIF

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