-
-
Notifications
You must be signed in to change notification settings - Fork 751
Manage Installed Services
Atmosphere comes with several services (interceptors, broadcaster, broadcaster cache, filters, etc). Sometime, default services are not required for your application and/or you need to install default one. This topic focuses on configurations points that help you to deal with installed services.
Key parameters should be kept in mind when configuring atmosphere with xml:
- Auto detect broadcaster: by default, broadcaster provided by plugins are scanned (hazelcast, redis, rmi, etc). If you don't use one of them, you can disabled it.
- Disable default interceptor: by default, many interceptors are installed by default. You can install some of them manually when you configured atmosphere to not install them by default.
- Disable interceptors: You can exclude some default interceptors from installation step.
- Install broadcast filters: you can install manually any broadcast filter by specifying the class name.
- Install broadcast cache: you can install manually any broadcaster cache by specifying the class name.
- Install broadcaster: you can install manually any broadcaster by specifying the class name.
- Install broadcaster factory: you can install manually any broadcaster factory by specifying the class name.
In addition to XML configuration, most of key settings are direclty availale through @ManagedService annotation when you use it.
Since 2.2 you can add a file named META-INF/services/org.atmosphere.cpr.AtmosphereFramework available inside the classpath.
You can specificy two blocks:
- an install block which enumerates any service to install
- an exclude block which enumerates any default service to not install
Sample:
INSTALL
com.myapp.MyInterceptor
org.atmosphere.interceptor.AtmosphereResourceLifecycleInterceptor
EXCLUDE
org.atmosphere.interceptor.HeartbeatInterceptor
Caution: be sure to not add to your classpath a jar that already includes a meta service file. Currently, only STOMP extension uses this feature. If you don't use STOMP, then you can use this alternative to configure atmosphere.
- 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