Class AtmosphereSession

java.lang.Object
org.atmosphere.cpr.AtmosphereSession

public class AtmosphereSession extends Object
An AtmosphereSession allow an application to keep track of the AtmosphereResource associated with a remote client. For example, with the long-polling transport, a new AtmosphereResource will be created every time a reconnect occurs. If an application has a reference to the AtmosphereResource, the object will become out of scope, or unusable, after the reconnection. To fix this problem, you can use this class to track and invoke tryAcquire() ()} or acquire()} in order to get the AtmosphereResource.

AtmosphereResource are tracked using the list of associated Broadcaster, e.g you must make sure the AtmosphereResource has called Broadcaster.addAtmosphereResource(AtmosphereResource) once if you want this class to work.

Author:
Jeanfrancois Arcand