|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value=TYPE) @Retention(value=RUNTIME) public @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 | |
|---|---|
String[] |
atmosphereConfig
Atmosphere's configuration that will be passed to the associated AtmosphereHandler. |
Class<? extends Broadcaster> |
broadcaster
The Broadcaster class name |
Class<? extends BroadcasterCache> |
broadcasterCache
The BroadcasterCache class name |
Class<? extends BroadcastFilter>[] |
broadcastFilters
A list of BroadcastFilter |
boolean |
dispatch
Dispatch the managed AtmosphereResource to the mapped
AtmosphereHandler.onRequest(org.atmosphere.cpr.AtmosphereResource). |
Class<? extends AtmosphereInterceptor>[] |
interceptors
A list of AtmosphereInterceptor to install. |
Class<? extends AtmosphereResourceEventListener>[] |
listeners
Add AtmosphereResourceEventListener to track internal events. |
String |
path
The Servlet path instance to instantiate at startup. |
String |
servlet
The Servlet instance to instantiate at startup. |
public abstract Class<? extends AtmosphereResourceEventListener>[] listeners
AtmosphereResourceEventListener to track internal events.
public abstract Class<? extends BroadcastFilter>[] broadcastFilters
BroadcastFilter
public abstract Class<? extends Broadcaster> broadcaster
Broadcaster class name
Broadcaster class namepublic abstract Class<? extends AtmosphereInterceptor>[] interceptors
AtmosphereInterceptor to install. Default are
TrackMessageSizeInterceptor and HeartbeatInterceptor
public abstract String[] atmosphereConfig
AtmosphereHandler. Configuration
name and value is delimited by "=", and different configuration lines are separated by comma.
public abstract Class<? extends BroadcasterCache> broadcasterCache
BroadcasterCache class name
Broadcaster class name. Default is UUIDBroadcasterCachepublic abstract String servlet
public abstract String path
public abstract boolean dispatch
AtmosphereResource to the mapped
AtmosphereHandler.onRequest(org.atmosphere.cpr.AtmosphereResource). If set to false, no
HTTP GET operations will invoke the ReflectorServletProcessor.onRequest(org.atmosphere.cpr.AtmosphereResource).
The HTTP method can be customized using ApplicationConfig.ATMOSPHERERESOURCE_INTERCEPTOR_METHOD value via
atmosphereConfig(). If the servlet() is undefined changing this value has no effect.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||