org.atmosphere.cpr
Class DefaultAtmosphereResourceSessionFactory

java.lang.Object
  extended by org.atmosphere.cpr.DefaultAtmosphereResourceSessionFactory
All Implemented Interfaces:
AtmosphereResourceSessionFactory

public class DefaultAtmosphereResourceSessionFactory
extends Object
implements AtmosphereResourceSessionFactory

Author:
uklance (https://github.com/uklance)

Constructor Summary
DefaultAtmosphereResourceSessionFactory()
           
 
Method Summary
 void destroy()
           
protected  AtmosphereResourceEventListener getDisconnectListener()
          Used in testing
 AtmosphereResourceSession getSession(AtmosphereResource resource)
          Returns the current session associated with the AtmosphereResource, or creates one if it does not yet exist.
 AtmosphereResourceSession getSession(AtmosphereResource r, boolean create)
          Returns the current session associated with the AtmosphereResource or, if there is no current session and create is true, returns a new session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAtmosphereResourceSessionFactory

public DefaultAtmosphereResourceSessionFactory()
Method Detail

getSession

public AtmosphereResourceSession getSession(AtmosphereResource r,
                                            boolean create)
Description copied from interface: AtmosphereResourceSessionFactory
Returns the current session associated with the AtmosphereResource or, if there is no current session and create is true, returns a new session.

If create is false and the request has no valid HttpSession, this method returns null.

Specified by:
getSession in interface AtmosphereResourceSessionFactory
Parameters:
r - An AtmosphereResource
create - true to create a new session if necessary; false to return null if there's no current session
Returns:
the session associated with this request or null if create is false and the resource has no valid session

getSession

public AtmosphereResourceSession getSession(AtmosphereResource resource)
Description copied from interface: AtmosphereResourceSessionFactory
Returns the current session associated with the AtmosphereResource, or creates one if it does not yet exist.

Specified by:
getSession in interface AtmosphereResourceSessionFactory
Parameters:
resource - An AtmosphereResource
Returns:
the current session associated with the AtmosphereResource, or creates one if it does not yet exist.

destroy

public void destroy()
Specified by:
destroy in interface AtmosphereResourceSessionFactory

getDisconnectListener

protected AtmosphereResourceEventListener getDisconnectListener()
Used in testing



Copyright © 2015. All Rights Reserved.