-
-
Notifications
You must be signed in to change notification settings - Fork 750
Using Atmosphere's Annotations
Jeanfrancois Arcand edited this page Sep 9, 2013
·
4 revisions
This page is for Atmosphere 1.0.x ONLY. For 2.0, see
If you are using Atmosphere Runtime, you can configure your application using an atmosphere.xml or web.xml's init-param, or use Atmosphere's Annotation. The available annotations are:
First, add in your pom.xml if you are using Atmosphere 1.0.x. Not needed with 1.1
<dependency>
<groupId>eu.infomas</groupId>
<artifactId>annotation-detector</artifactId>
<version>3.0.1</version>
</dependency>
Next, define the following in your web/application.xml
<init-param>
<param-name>org.atmosphere.cpr.packages</param-name>
<param-value>your.class.package</param-value>
</init-param>
The available annotations are:
- AtmosphereHandlerService : At least on class must be annotated with this annotation if you are using AtmosphereServlet. The class must implements the AtmosphereHandler interface. See this tutorial for more information.
- BroadcasterCacheService : If you are planning to support your own BroadcasterCache implementation, use this annotation to tell Atmosphere to use it.
- BroadcasterFilterService : If you want to add BroadcastFilter to your application, annotate them using this annotation.
- BroadcasterService : If you are planning to support your own Broadcaster implementation, use this annotation to tell Atmosphere to use it.
- MeteorService : At least on class must be annotated with this annotation if you are using Atmosphere as as MeteorServlet. This class will install Meteor automatically.
- WebSocketHandlerService : If you want to write pure WebSocket application.
- WebSocketProtocolService : If you want to write your own WebSocketProtocol support for Atmosphere.
- AtmosphereInterceptor : Install AtmosphereInterceptor
- AsyncSupportListenerService : You can install a global events listener using that annotation. Read this document for more information.
- ManagedService A Meta Annotation which install a BroadcasterCache and several AtmosphereInterceptor.
- 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