Class OnDisconnectInterceptor

java.lang.Object
org.atmosphere.cpr.AtmosphereInterceptorAdapter
org.atmosphere.interceptor.OnDisconnectInterceptor
All Implemented Interfaces:
AtmosphereInterceptor, AtmosphereConfigAware, InvokationOrder

public class OnDisconnectInterceptor extends AtmosphereInterceptorAdapter
When the browser close the connection, the atmosphere.js will send an unsubscribe message to tell framework the browser is disconnecting.

A close message carrying HeaderConfig.X_ATMOSPHERE_CLOSE_REASON going-away (atmosphere.js sends it from pagehide) marks the disconnect event AtmosphereResourceEventImpl.closedGoingAway(): the page is reloading or navigating, as a WebSocket closed with 1001. Without it, the client left on purpose.