protected void processConnectionEvent(ConnectionEvent event){
  for (Enumeration<ConnectionListener> e=connectionListeners.elements(); e.hasMoreElements(); ) {
    ConnectionListener l=e.nextElement();
switch (event.getType()) {
case ConnectionEvent.CONNECTED:
      l.connected((ConnectedEvent)event);
    break;
case ConnectionEvent.DISCONNECTED:
  l.disconnected((DisconnectedEvent)event);
break;
case ConnectionEvent.PACKET_RECEIVED:
l.packetReceived((PacketReceivedEvent)event);
break;
}
}
}

protected void processConnectionEvent ( ConnectionEvent event ) { for ( Enumeration < ConnectionListener > e = connectionListeners . elements ( ) ; e . hasMoreElements ( ) ; ) { ConnectionListener l = e . nextElement ( ) ; switch ( event . getType ( ) ) { case ConnectionEvent . CONNECTED : l . connected ( ( ConnectedEvent ) event ) ; break ; case ConnectionEvent . DISCONNECTED : l . disconnected ( ( DisconnectedEvent ) event ) ; break ; case ConnectionEvent . PACKET_RECEIVED : l . packetReceived ( ( PacketReceivedEvent ) event ) ; break ; } } }
processes game events occurring on this connection by dispatching them to any registered gamelistener objects .
