(AtmosphereResource<HttpServletRequest, HttpServletResponse>)
req.getAttribute(AtmosphereServlet.ATMOSPHERE_RESOURCE);
BroadcasterFactory bp = (BroadcasterFactory)
req.getAttribute(AtmosphereServlet.BROADCASTER_FACTORY);
broadcaster = bp.lookup(r.getBroadcaster().getClass(), topic, true);
} catch (Throwable ex) {
throw new WebApplicationException(ex);
}
req.setAttribute(AtmosphereFilter.INJECTED_BROADCASTER, broadcaster);
return broadcaster;