public class DefaultAtmosphereResourceSessionFactory extends Object implements AtmosphereResourceSessionFactory
Constructor and Description |
---|
DefaultAtmosphereResourceSessionFactory() |
Modifier and Type | Method and Description |
---|---|
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. |
public DefaultAtmosphereResourceSessionFactory()
public AtmosphereResourceSession getSession(AtmosphereResource r, boolean create)
AtmosphereResourceSessionFactory
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.getSession
in interface AtmosphereResourceSessionFactory
r
- An AtmosphereResource
create
- true to create a new session if necessary; false to return
null if there's no current sessionpublic AtmosphereResourceSession getSession(AtmosphereResource resource)
AtmosphereResourceSessionFactory
AtmosphereResource
, or creates one if it does not yet exist.getSession
in interface AtmosphereResourceSessionFactory
resource
- An AtmosphereResource
AtmosphereResource
, or creates one if it does not yet
exist.public void destroy()
destroy
in interface AtmosphereResourceSessionFactory
protected AtmosphereResourceEventListener getDisconnectListener()
Copyright © 2016. All rights reserved.