org.atmosphere.cpr
Class AtmosphereResourceFactory

java.lang.Object
  extended by org.atmosphere.cpr.AtmosphereResourceFactory

public final class AtmosphereResourceFactory
extends Object

A Factory used to manage AtmosphereResource instance. You can use that factory to create, remove and find AtmosphereResource instance that are associated with one or several Broadcaster.

Author:
Jeanfrancois Arcand

Constructor Summary
AtmosphereResourceFactory()
           
 
Method Summary
 AtmosphereResource create(AtmosphereConfig config, AtmosphereRequest request, AtmosphereResponse response, AsyncSupport<?> a)
          Create an AtmosphereResourceImpl
 AtmosphereResource create(AtmosphereConfig config, AtmosphereResponse response, AsyncSupport<?> a)
          Create an AtmosphereResourceImpl
 AtmosphereResource create(AtmosphereConfig config, Broadcaster broadcaster, AtmosphereRequest request, AtmosphereResponse response, AsyncSupport<?> a, AtmosphereHandler handler)
          Create an AtmosphereResourceImpl
 AtmosphereResource create(AtmosphereConfig config, Broadcaster broadcaster, AtmosphereResponse response, AsyncSupport<?> a, AtmosphereHandler handler)
          Create an AtmosphereResourceImpl
 AtmosphereResource create(AtmosphereConfig config, String uuid)
          Create an AtmosphereResource associated with the uuid.
 AtmosphereResource find(String uuid)
          Find an AtmosphereResource based on its AtmosphereResource.uuid()
static AtmosphereResourceFactory getDefault()
           
 AtmosphereResource remove(String uuid)
          Remove the AtmosphereResource from all instance of Broadcaster
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AtmosphereResourceFactory

public AtmosphereResourceFactory()
Method Detail

create

public final AtmosphereResource create(AtmosphereConfig config,
                                       AtmosphereRequest request,
                                       AtmosphereResponse response,
                                       AsyncSupport<?> a)
Create an AtmosphereResourceImpl

Parameters:
config - an AtmosphereConfig
request - an AtmosphereResponse
a - AsyncSupport
Returns:
an AtmosphereResourceImpl

create

public final AtmosphereResource create(AtmosphereConfig config,
                                       Broadcaster broadcaster,
                                       AtmosphereRequest request,
                                       AtmosphereResponse response,
                                       AsyncSupport<?> a,
                                       AtmosphereHandler handler)
Create an AtmosphereResourceImpl

Parameters:
config - an AtmosphereConfig
broadcaster - a Broadcaster
response - an AtmosphereResponse
a - AsyncSupport
handler - an AtmosphereHandler
Returns:
an AtmosphereResourceImpl

create

public final AtmosphereResource create(AtmosphereConfig config,
                                       Broadcaster broadcaster,
                                       AtmosphereResponse response,
                                       AsyncSupport<?> a,
                                       AtmosphereHandler handler)
Create an AtmosphereResourceImpl

Parameters:
config - an AtmosphereConfig
broadcaster - a Broadcaster
response - an AtmosphereResponse
a - AsyncSupport
handler - an AtmosphereHandler
Returns:
an AtmosphereResourceImpl

create

public final AtmosphereResource create(AtmosphereConfig config,
                                       AtmosphereResponse response,
                                       AsyncSupport<?> a)
Create an AtmosphereResourceImpl

Parameters:
config - an AtmosphereConfig
response - an AtmosphereResponse
a - AsyncSupport
Returns:
an AtmosphereResourceImpl

create

public final AtmosphereResource create(AtmosphereConfig config,
                                       String uuid)
Create an AtmosphereResource associated with the uuid.

Parameters:
config - an AtmosphereConfig
uuid - a String representing a UUID
Returns:

remove

public final AtmosphereResource remove(String uuid)
Remove the AtmosphereResource from all instance of Broadcaster

Parameters:
uuid - the AtmosphereResource.uuid()
Returns:
the AtmosphereResource, or null if not found.

find

public final AtmosphereResource find(String uuid)
Find an AtmosphereResource based on its AtmosphereResource.uuid()

Parameters:
uuid - the AtmosphereResource.uuid()
Returns:
the AtmosphereResource, or null if not found.

getDefault

public static final AtmosphereResourceFactory getDefault()


Copyright © 2013. All Rights Reserved.