String appletEvent = parts[1];
Hashtable<String, ParameterHolder> params = new Hashtable<String, ParameterHolder>(1);
if (appletEvent.equals("stopped")){
appletInfo = whatsRunning.get(appletName);
params.put("appletId", new ParameterHolder(appletInfo.getAppletId()));
_log.debug("Posting RunComplete event");
ClientEventManager.postEvent(LaunchMgr.this, "RunCompleted", params);
whatsRunning.remove(appletName);
closeConnection = true;
} else if (appletEvent.equals("started")){
AppletRunInfo info = new AppletRunInfo();
info.setAppletName(appletName);
info.setAppletId(LaunchMgr.this.nextAppletID++);
this.appletInfo = info;
whatsRunning.put(appletName, info);
params.put("applet", new ParameterHolder(appletInfo));
_log.debug("Posting RunStarted event");
ClientEventManager.postEvent(LaunchMgr.this, "RunStarted", params);
}
} catch (ClassNotFoundException classnot){
System.err.println("Data received in unknown format");
}
} while(!closeConnection);
} catch (java.io.EOFException e){
Hashtable<String, ParameterHolder> params = new Hashtable<String, ParameterHolder>(1);
params.put("appletId", new ParameterHolder(appletInfo.getAppletId()));
_log.debug("Posting RunComplete event after connection closed");
ClientEventManager.postEvent(LaunchMgr.this, "RunCompleted", params);
} catch (IOException e) {
_log.error("Launch manager listener exception", e);
} finally {