Package org.atmosphere.config.service
Annotation Type AtmosphereService
-
@Target(TYPE) @Retention(RUNTIME) public @interface AtmosphereServiceAn annotation which acts like theManagedServiceannotated 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 likeBroadcaster,AtmosphereInterceptor, etc. This annotation doesn't install any Atmosphere Component likeManagedService,AtmosphereHandlerorWebSocketHandler. The framework supporting the annotation must itself deploy an Atmosphere's Service when specified, Theservlet()returned value will be used to install aReflectorServletProcessorthat will dispatch requests to theServlet. You can customize the request dispatch by setting thedispatch()to false. When set to false, theReflectorServletProcessor.onRequest(org.atmosphere.cpr.AtmosphereResource)will never be invoked. By default, only theTrackMessageSizeInterceptoris installed.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]atmosphereConfigAtmosphere's configuration that will be passed to the associatedAtmosphereHandler.java.lang.Class<? extends Broadcaster>broadcasterTheBroadcasterclass namejava.lang.Class<? extends BroadcasterCache>broadcasterCacheTheBroadcasterCacheclass namejava.lang.Class<? extends BroadcastFilter>[]broadcastFiltersA list ofBroadcastFilterbooleandispatchDispatch the managedAtmosphereResourceto the mappedAtmosphereHandler.onRequest(org.atmosphere.cpr.AtmosphereResource).java.lang.Class<? extends AtmosphereInterceptor>[]interceptorsA list ofAtmosphereInterceptorto install.java.lang.Class<? extends AtmosphereResourceEventListener>[]listenersAddAtmosphereResourceEventListenerto track internal events.java.lang.StringpathThe Servlet path instance to instantiate at startup.java.lang.StringservletThe Servlet instance to instantiate at startup.
-
-
-
Element Detail
-
listeners
java.lang.Class<? extends AtmosphereResourceEventListener>[] listeners
AddAtmosphereResourceEventListenerto track internal events.- Default:
- {}
-
-
-
broadcastFilters
java.lang.Class<? extends BroadcastFilter>[] broadcastFilters
A list ofBroadcastFilter- Default:
- {}
-
-
-
broadcaster
java.lang.Class<? extends Broadcaster> broadcaster
TheBroadcasterclass name- Returns:
- The
Broadcasterclass name
- Default:
- org.atmosphere.cpr.DefaultBroadcaster.class
-
-
-
interceptors
java.lang.Class<? extends AtmosphereInterceptor>[] interceptors
A list ofAtmosphereInterceptorto install. Default areTrackMessageSizeInterceptorandHeartbeatInterceptor- Default:
- {org.atmosphere.client.TrackMessageSizeInterceptor.class}
-
-
-
atmosphereConfig
java.lang.String[] atmosphereConfig
Atmosphere'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
java.lang.Class<? extends BroadcasterCache> broadcasterCache
TheBroadcasterCacheclass name- Returns:
- The
Broadcasterclass name. Default isUUIDBroadcasterCache
- Default:
- org.atmosphere.cache.UUIDBroadcasterCache.class
-
-
-
dispatch
boolean dispatch
Dispatch 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
-
-