-
-
Notifications
You must be signed in to change notification settings - Fork 750
Using the MeteorService Annotation
ntrp edited this page Nov 20, 2014
·
4 revisions
The MeteorService can be used to configure existing Servlet based Application. Any Servlet can be simply annotated and can start using the Atmosphere's Meteor API. As simple as this
The annotation's attributes available are
-
path
: The path to the resource. The default is "/" so if your have mapped the MeteorServlet 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. -
listeners
: Add one or several AtmosphereResourceEventListener. Usefull if your application needs to execute some actions based on the AtmosphereResource's life cycle. -
broadcaster
: The Broadcaster to use for every request. The default is the DefaultBroadcaster -
interceptors
: The list of AtmosphereInterceptor. It is strongly recommended to install one or all of the following interceptor to simplify your application's code: AtmosphereResourceLifecycleInterceptor, TrackMessageSizeInterceptor, HeartbeatInterceptor, SuspendTrackerInterceptor. -
atmosphereConfig
: Configure some ApplicationConfig properties. Those properties can be used to configure the Atmosphere's runtime. Default is empty. -
broadcasterCache
: Install a BroadcasterCache to repent loosing messages when a network outage happens.. Default is UUIDBroadcasterCache -
broadcastFilters
: Install BroadcastFilter for manipulating messages before they get delivered to the client. Default is empty. -
supportSession
: Set to true if HttpSession needs to be supported. Default is false.
The Singleton annotation can be used to force Atmosphere to create a single, thread safe instance of a MeteorService annotated classes. For example, if your application set the @MeteorService's path attribute with using path templates {something}
, by default a new instance of the annotated classes will be created. When annotated with Singleton, a single class will be created.
- 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