Package org.atmosphere.config.service
Annotation Interface AtmosphereService
An annotation which acts like the
ManagedService annotated resource, but
that can be used with frameworks like Jersey, Wicket or any framework running the Atmosphere Framework. The annotation
allow configuring Atmosphere's components like Broadcaster, AtmosphereInterceptor, etc.
This annotation doesn't install any Atmosphere Component like ManagedService, AtmosphereHandler
or WebSocketHandler. The framework supporting the annotation must itself deploy an
Atmosphere's Service when specified, The servlet() returned value will be used to install a
ReflectorServletProcessor that will dispatch requests to the Servlet.
You can customize the request dispatch by setting the dispatch() to false. When set to false, the
ReflectorServletProcessor.onRequest(org.atmosphere.cpr.AtmosphereResource) will never be invoked.
By default, only the TrackMessageSizeInterceptor is installed.-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]Atmosphere's configuration that will be passed to the associatedAtmosphereHandler.Class<? extends Broadcaster> TheBroadcasterclass nameClass<? extends BroadcasterCache> TheBroadcasterCacheclass nameClass<? extends BroadcastFilter>[]A list ofBroadcastFilterbooleanDispatch the managedAtmosphereResourceto the mappedAtmosphereHandler.onRequest(org.atmosphere.cpr.AtmosphereResource).Class<? extends AtmosphereInterceptor>[]A list ofAtmosphereInterceptorto install.Class<? extends AtmosphereResourceEventListener>[]AddAtmosphereResourceEventListenerto track internal events.The Servlet path instance to instantiate at startup.The Servlet instance to instantiate at startup.
-
Element Details
-
listeners
Class<? extends AtmosphereResourceEventListener>[] listenersAddAtmosphereResourceEventListenerto track internal events.- Default:
{}
-
broadcastFilters
Class<? extends BroadcastFilter>[] broadcastFiltersA list ofBroadcastFilter- Default:
{}
-
broadcaster
Class<? extends Broadcaster> broadcasterTheBroadcasterclass name- Returns:
- The
Broadcasterclass name
- Default:
org.atmosphere.cpr.DefaultBroadcaster.class
-
interceptors
Class<? extends AtmosphereInterceptor>[] interceptorsA list ofAtmosphereInterceptorto install. Default areTrackMessageSizeInterceptorandHeartbeatInterceptor- Default:
{org.atmosphere.client.TrackMessageSizeInterceptor.class}
-
atmosphereConfig
String[] atmosphereConfigAtmosphere's configuration that will be passed to the associatedAtmosphereHandler. Configuration name and value is delimited by "=", and different configuration lines are separated by comma.- Default:
{}
-
broadcasterCache
Class<? extends BroadcasterCache> broadcasterCacheTheBroadcasterCacheclass name- Returns:
- The
Broadcasterclass name. Default isUUIDBroadcasterCache
- Default:
org.atmosphere.cache.UUIDBroadcasterCache.class
-
servlet
String servletThe Servlet instance to instantiate at startup.- Default:
""
-
path
String pathThe Servlet path instance to instantiate at startup.- Default:
"/"
-
dispatch
boolean dispatchDispatch the managedAtmosphereResourceto the mappedAtmosphereHandler.onRequest(org.atmosphere.cpr.AtmosphereResource). If set to false, no HTTP GET operations will invoke theReflectorServletProcessor.onRequest(org.atmosphere.cpr.AtmosphereResource). The HTTP method can be customized usingApplicationConfig.ATMOSPHERERESOURCE_INTERCEPTOR_METHODvalue viaatmosphereConfig(). If theservlet()is undefined changing this value has no effect.- Default:
true
-