public class DefaultAtmosphereResourceFactory extends Object implements AtmosphereResourceFactory
AtmosphereResource instances. You can use this factory to create, remove and find
AtmosphereResource instances that are associated with one or several Broadcasters.AtmosphereResourceFactory.Async| Constructor and Description |
|---|
DefaultAtmosphereResourceFactory() |
public void configure(AtmosphereConfig config)
AtmosphereConfigAwareconfigure in interface AtmosphereResourceFactoryconfigure in interface AtmosphereConfigAwareconfig - AtmosphereConfigpublic AtmosphereResource create(AtmosphereConfig config, AtmosphereRequest request, AtmosphereResponse response, AsyncSupport<?> a)
AtmosphereResourceImplcreate in interface AtmosphereResourceFactoryconfig - an AtmosphereConfigrequest - an AtmosphereResponsea - AsyncSupportAtmosphereResourceImplpublic AtmosphereResource create(AtmosphereConfig config, Broadcaster broadcaster, AtmosphereRequest request, AtmosphereResponse response, AsyncSupport<?> a, AtmosphereHandler handler)
AtmosphereResourceImpl.create in interface AtmosphereResourceFactoryconfig - an AtmosphereConfigbroadcaster - a Broadcasterresponse - an AtmosphereResponsea - AsyncSupporthandler - an AtmosphereHandlerAtmosphereResourceImplpublic AtmosphereResource create(AtmosphereConfig config, Broadcaster broadcaster, AtmosphereRequest request, AtmosphereResponse response, AsyncSupport<?> a, AtmosphereHandler handler, AtmosphereResource.TRANSPORT t)
AtmosphereResourceImpl.create in interface AtmosphereResourceFactoryconfig - an AtmosphereConfigbroadcaster - a Broadcasterresponse - an AtmosphereResponsea - AsyncSupporthandler - an AtmosphereHandlert - an AtmosphereResource.TRANSPORTAtmosphereResourceImplpublic AtmosphereResource create(AtmosphereConfig config, Broadcaster broadcaster, AtmosphereResponse response, AsyncSupport<?> a, AtmosphereHandler handler)
AtmosphereResourceImpl.create in interface AtmosphereResourceFactoryconfig - an AtmosphereConfigbroadcaster - a Broadcasterresponse - an AtmosphereResponsea - AsyncSupporthandler - an AtmosphereHandlerAtmosphereResourceImplpublic AtmosphereResource create(AtmosphereConfig config, Broadcaster broadcaster, AtmosphereResponse response, AsyncSupport<?> a, AtmosphereHandler handler, AtmosphereResource.TRANSPORT t)
create in interface AtmosphereResourceFactorypublic AtmosphereResource create(AtmosphereConfig config, AtmosphereResponse response, AsyncSupport<?> a)
AtmosphereResourceImpl.create in interface AtmosphereResourceFactoryconfig - an AtmosphereConfigresponse - an AtmosphereResponsea - AsyncSupportAtmosphereResourceImplpublic AtmosphereResource create(AtmosphereConfig config, String uuid)
AtmosphereResource associated with the uuid.create in interface AtmosphereResourceFactoryconfig - an AtmosphereConfiguuid - a String representing a UUIDpublic AtmosphereResource create(AtmosphereConfig config, String uuid, AtmosphereRequest request)
AtmosphereResource associated with the uuid.create in interface AtmosphereResourceFactoryconfig - an AtmosphereConfiguuid - a String representing a UUIDrequest - a AtmosphereRequestpublic AtmosphereResource remove(String uuid)
AtmosphereResource from all instances of Broadcaster.remove in interface AtmosphereResourceFactoryuuid - the AtmosphereResource.uuid()AtmosphereResource, or null if not found.public AtmosphereResource find(String uuid)
AtmosphereResource based on its AtmosphereResource.uuid().find in interface AtmosphereResourceFactoryuuid - the AtmosphereResource.uuid()AtmosphereResource, or null if not found.public void locate(String uuid, AtmosphereResourceFactory.Async async)
AtmosphereResourceFactoryAtmosphereResource, based on its AtmosphereResource.uuid(), in a
cluster. If the AtmosphereResource is available in the cluster, the AtmosphereResourceFactory.Async.available(org.atmosphere.cpr.AtmosphereResource)
callback will be invoked. If not, the org.atmosphere.cpr.AtmosphereResourceFactory.Async#notAvailablelocate in interface AtmosphereResourceFactoryuuid - the AtmosphereResource.uuid()async - an AtmosphereResourceFactory.Async@Deprecated public Set<Broadcaster> broadcasters(String uuid)
AtmosphereResourceFactory.find(String).broadcasters() insteadBroadcaster associated with a AtmosphereResource.uuid(), e.g for which
Broadcaster.addAtmosphereResource(AtmosphereResource) has been called. Note that this
method is not synchronized and may not return all the Broadcaster in case
Broadcaster.addAtmosphereResource(AtmosphereResource) is being called concurrently.broadcasters in interface AtmosphereResourceFactoryuuid - the AtmosphereResource.uuid()Broadcaster associated with a AtmosphereResource.uuid()public void registerUuidForFindCandidate(AtmosphereResource r)
AtmosphereResource for being a candidate to find(String) operation.registerUuidForFindCandidate in interface AtmosphereResourceFactoryr - AtmosphereResourcepublic void unRegisterUuidForFindCandidate(AtmosphereResource r)
AtmosphereResource for being a candidate to find(String) operation.unRegisterUuidForFindCandidate in interface AtmosphereResourceFactoryr - AtmosphereResourcepublic void destroy()
destroy in interface AtmosphereResourceFactorypublic ConcurrentMap<String,AtmosphereResource> resources()
resources in interface AtmosphereResourceFactorypublic Collection<AtmosphereResource> findAll()
findAll in interface AtmosphereResourceFactoryCopyright © 2016. All rights reserved.