@Target(value=TYPE) @Retention(value=RUNTIME) public @interface AtmosphereService
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.Modifier and Type | Optional Element and Description |
---|---|
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 nameBroadcaster
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 nameBroadcaster
class name. Default is UUIDBroadcasterCache
public 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.Copyright © 2016. All rights reserved.