public interface AtmosphereResourceFactory extends AtmosphereConfigAware
AtmosphereResource instances. You can use this factory to create, remove and find
AtmosphereResource instances that are associated with one or several Broadcasters.| Modifier and Type | Interface and Description |
|---|---|
static interface |
AtmosphereResourceFactory.Async
An interface to use in order to retrieve an
AtmosphereResource inside a cluster. |
void configure(AtmosphereConfig config)
AtmosphereConfigAwareconfigure in interface AtmosphereConfigAwareconfig - AtmosphereConfigAtmosphereResource create(AtmosphereConfig config, AtmosphereRequest request, AtmosphereResponse response, AsyncSupport<?> a)
AtmosphereResourceImplconfig - an AtmosphereConfigrequest - an AtmosphereResponsea - AsyncSupportAtmosphereResourceImplAtmosphereResource create(AtmosphereConfig config, Broadcaster broadcaster, AtmosphereRequest request, AtmosphereResponse response, AsyncSupport<?> a, AtmosphereHandler handler)
AtmosphereResourceImpl.config - an AtmosphereConfigbroadcaster - a Broadcasterresponse - an AtmosphereResponsea - AsyncSupporthandler - an AtmosphereHandlerAtmosphereResourceImplAtmosphereResource create(AtmosphereConfig config, Broadcaster broadcaster, AtmosphereRequest request, AtmosphereResponse response, AsyncSupport<?> a, AtmosphereHandler handler, AtmosphereResource.TRANSPORT t)
AtmosphereResourceImpl.config - an AtmosphereConfigbroadcaster - a Broadcasterresponse - an AtmosphereResponsea - AsyncSupporthandler - an AtmosphereHandlert - an AtmosphereResource.TRANSPORTAtmosphereResourceImplAtmosphereResource create(AtmosphereConfig config, Broadcaster broadcaster, AtmosphereResponse response, AsyncSupport<?> a, AtmosphereHandler handler)
AtmosphereResourceImpl.config - an AtmosphereConfigbroadcaster - a Broadcasterresponse - an AtmosphereResponsea - AsyncSupporthandler - an AtmosphereHandlerAtmosphereResourceImplAtmosphereResource create(AtmosphereConfig config, Broadcaster broadcaster, AtmosphereResponse response, AsyncSupport<?> a, AtmosphereHandler handler, AtmosphereResource.TRANSPORT t)
AtmosphereResource create(AtmosphereConfig config, AtmosphereResponse response, AsyncSupport<?> a)
AtmosphereResourceImpl.config - an AtmosphereConfigresponse - an AtmosphereResponsea - AsyncSupportAtmosphereResourceImplAtmosphereResource create(AtmosphereConfig config, String uuid)
AtmosphereResource associated with the uuid.config - an AtmosphereConfiguuid - a String representing a UUIDAtmosphereResource create(AtmosphereConfig config, String uuid, AtmosphereRequest request)
AtmosphereResource associated with the uuid.config - an AtmosphereConfiguuid - a String representing a UUIDrequest - a AtmosphereRequestAtmosphereResource remove(String uuid)
AtmosphereResource from all instances of Broadcaster.uuid - the AtmosphereResource.uuid()AtmosphereResource, or null if not found.AtmosphereResource find(String uuid)
AtmosphereResource based on its AtmosphereResource.uuid().uuid - the AtmosphereResource.uuid()AtmosphereResource, or null if not found.void locate(String uuid, AtmosphereResourceFactory.Async async)
AtmosphereResource, 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#notAvailableuuid - the AtmosphereResource.uuid()async - an AtmosphereResourceFactory.Async@Deprecated Set<Broadcaster> broadcasters(String uuid)
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.uuid - the AtmosphereResource.uuid()Broadcaster associated with a AtmosphereResource.uuid()void registerUuidForFindCandidate(AtmosphereResource r)
AtmosphereResource for being a candidate to find(String) operation.r - AtmosphereResourcevoid unRegisterUuidForFindCandidate(AtmosphereResource r)
AtmosphereResource for being a candidate to find(String) operation.r - AtmosphereResourcevoid destroy()
ConcurrentMap<String,AtmosphereResource> resources()
Collection<AtmosphereResource> findAll()
Copyright © 2016. All rights reserved.