-
-
Notifications
You must be signed in to change notification settings - Fork 751
Using AtmosphereService Annotation
ntrp edited this page Nov 20, 2014
·
3 revisions
The AtmosphereService annotation can be used with existing framework in order to configure Atmosphere at deployment time. For example, you can use this annotation with the Atmosphere-Jersey module to configure AtmosphereInterceptor, BroadcasterCache, etc. You can also use this annotation with other framework. For example, running Jersey 2 resource can be easily done by just doing this.
The Attributes availables are:
-
atmosphereConfig
: Configure Atmosphere's property, as defined here. Default is empty. -
broadcaster
: The Broadcaster to use for every request. The default is the DefaultBroadcaster -
broadcasterCache
: Install a BroadcasterCache. Default is UUIDBroadcasterCache -
broadcastFilters
: Install BroadcastFilter for manipulating messages before they get delivered to the client. Default is empty. -
dispath
: When theservlet
is defined, setting that value to false will prevent Atmosphere from dispatching the HTTP GET request to the RelectorServletProcessor, which is responsible for running the defined servlet. Default method is GET, and can be changed by using ApplicationConfig. Default value is true. -
interceptors
: The list of AtmosphereInterceptor. By default, tor.html), TrackMessageSizeInterceptor, HeartbeatInterceptor are installed. -
listeners
: Add one or several AtmosphereResourceEventListener. Usefull if your application needs to execute some actions based on the AtmosphereResource's life cycle. -
path
: The path to the resource. The default is "/" so if your have mapped the AtmosphereServlet to '/*', all request will be delivered to your annotated class. You can also customize the path. The path value will be used to associate the AtmosphereResource with a Broadcaster, and the Broadcater's getID() will be the path value. -
servlet
: A class that implements the Servlet interface. When defined, Atmosphere will dispatch requests to that class using the ReflectorServletProcessor; Default is null.
- Understanding Atmosphere
- Understanding @ManagedService
- Using javax.inject.Inject and javax.inject.PostConstruct annotation
- Understanding Atmosphere's Annotation
- Understanding AtmosphereResource
- Understanding AtmosphereHandler
- Understanding WebSocketHandler
- Understanding Broadcaster
- Understanding BroadcasterCache
- Understanding Meteor
- Understanding BroadcastFilter
- Understanding Atmosphere's Events Listeners
- Understanding AtmosphereInterceptor
- Configuring Atmosphere for Performance
- Understanding JavaScript functions
- Understanding AtmosphereResourceSession
- Improving Performance by using the PoolableBroadcasterFactory
- Using Atmosphere Jersey API
- Using Meteor API
- Using AtmosphereHandler API
- Using Socket.IO
- Using GWT
- Writing HTML5 Server-Sent Events
- Using STOMP protocol
- Streaming WebSocket messages
- Configuring Atmosphere's Classes Creation and Injection
- Using AtmosphereInterceptor to customize Atmosphere Framework
- Writing WebSocket sub protocol
- Configuring Atmosphere for the Cloud
- Injecting Atmosphere's Components in Jersey
- Sharing connection between Browser's windows and tabs
- Understanding AtmosphereResourceSession
- Manage installed services
- Server Side: javadoc API
- Server Side: atmosphere.xml and web.xml configuration
- Client Side: atmosphere.js API