private static final Logger logger = LoggerFactory.getLogger(WebSocketHandlerServiceProcessor.class);
@Override
public void handle(AtmosphereFramework framework, Class<WebSocketHandler> annotatedClass) {
try {
WebSocketHandlerService m = annotatedClass.getAnnotation(WebSocketHandlerService.class);
atmosphereConfig(m.atmosphereConfig(), framework);
framework.addAtmosphereHandler(m.path(), AtmosphereFramework.REFLECTOR_ATMOSPHEREHANDLER).initWebSocket();
framework.setDefaultBroadcasterClassName(m.broadcaster().getName());
filters(m.broadcastFilters(), framework);
final LinkedList<AtmosphereInterceptor> l = new LinkedList<AtmosphereInterceptor>();
AtmosphereInterceptor aa = listeners(m.listeners(), framework);
if (aa != null) {
l.add(aa);
}
AnnotationUtil.interceptors(framework, m.interceptors(), l);
framework.setBroadcasterCacheClassName(m.broadcasterCache().getName());
WebSocketProcessor p = WebSocketProcessorFactory.getDefault().getWebSocketProcessor(framework);
p.registerWebSocketHandler(m.path(), new WebSocketProcessor.WebSocketHandlerProxy(broadcasterClass(framework, m.broadcaster()),
framework.newClassInstance(WebSocketHandler.class, annotatedClass), l));
framework.getAtmosphereConfig().startupHook(new AtmosphereConfig.StartupHook() {
@Override
public void started(AtmosphereFramework framework) {
framework.initHandlerInterceptors(l);