use of org.atmosphere.runtime.BroadcasterListener in project atmosphere by Atmosphere.
the class BroadcasterListenerServiceProcessor method handle.
@Override
public void handle(AtmosphereFramework framework, Class<BroadcasterListener> annotatedClass) {
try {
BroadcasterListener l = framework.newClassInstance(BroadcasterListener.class, annotatedClass);
framework.addBroadcasterListener(l);
// We must reconfigure all existing Broadcaster
Collection<Broadcaster> c = framework.getBroadcasterFactory().lookupAll();
for (Broadcaster b : c) {
l.onPostCreate(b);
}
} catch (Throwable e) {
logger.warn("", e);
}
}
Aggregations