public void fireEvent(NCCPConnection.ConnectionEvent e) { ConnectionListener l; int max = listeners.size(); for (int i = 0; i < max; ++i) { ExpCoordinator.print( new String( "NCCPConnection.fireEvent (" + toString() + ") event: " + e.getType() + " max:" + max + " i:" + i), 2); l = (ConnectionListener) (listeners.elementAt(i)); switch (e.getType()) { case ConnectionEvent.CONNECTION_FAILED: l.connectionFailed(e); break; case ConnectionEvent.CONNECTION_CLOSED: l.connectionClosed(e); break; case ConnectionEvent.CONNECTION_OPENED: ExpCoordinator.printer.print( new String("Opened control connection (" + toString() + ")")); l.connectionOpened(e); } } }