if (logger.isDebugEnabled()) {
logger.debug("Calling listeners to " + this);
}
if (!listeners.isEmpty()) {
ConnectionEvent e = new ConnectionEvent(this);
// Create a copy of the listeners list just in case the
// connectionClosed method removes the listener.
List list = new ArrayList(listeners);
for (Iterator i = list.iterator(); i.hasNext();) {
((ConnectionEventListener) i.next()).connectionClosed(e);