Manage Installed Services - Atmosphere/atmosphere Wiki

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.

XML configuration

Key parameters should be kept in mind when configuring atmosphere with xml:

Managed service

In addition to XML configuration, most of key settings are direclty availale through @ManagedService annotation when you use it.

Meta services (since 2.2)

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:

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.