Using the WebSocketHandlerService Annotation - Atmosphere/atmosphere Wiki

The WebSocketHandlerService can be used to configure an implementation of WebSocketHandlerService. As simple as this

@WebSocketHandlerService

The annotation's attributes available are

Class Scope Annotations available

@Singleton

The Singleton annotation can be used to force Atmosphere to create a single, thread safe instance of a WebSocketHandlerService's annotated classes. For example, if your application set the @WebSocketHandlerService'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.