Skip to content

Retrieving the original AtmosphereResource with WebSocket

Jeanfrancois Arcand edited this page Jun 28, 2015 · 6 revisions

This content has been merged into Understanding AtmosphereResource

To support WebSocket the same way as other transport, Atmosphere, by default, creates an AtmosphereResource for the handshake operation, and new AtmosphereResource every time a new websocket message is received. In case your application needs to retrieve the original one, e.g the one used for the handshake, just using the following attribute from any AtmosphereRequest:

   String uuid = (String) request
        .getAttribute(ApplicationConfig.SUSPENDED_ATMOSPHERE_RESOURCE_UUID);
   AtmosphereResource resource = atmosphereResourceFactory.find(uuid);

Step by Step Tutorials

Concepts & Architecture

15 Minutes Tutorial

Advanced Topics

API

Known WebServer Issues

References

External Documentations

githalytics.com alpha

Clone this wiki locally