framework.addAtmosphereHandler("/*", new AtmosphereHandler() {
@Override
public void onRequest(AtmosphereResource resource) throws IOException {
resource.addEventListener(new WebSocketEventListenerAdapter() {
@Override
public void onDisconnect(WebSocketEvent event) {
uuid.set((String) event.webSocket().resource().getRequest().getAttribute(SUSPENDED_ATMOSPHERE_RESOURCE_UUID));
}
});