141142143144145146147148149150151
resource.removeEventListener(this); } }); } resource.addEventListener(new OnClose() { @Override public void onClose(AtmosphereResourceEvent event) { invoke(onDisconnectMethod, event); } });