Search in sources :

Example 1 with BroadcasterListener

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);
    }
}
Also used : BroadcasterListener(org.atmosphere.runtime.BroadcasterListener) Broadcaster(org.atmosphere.runtime.Broadcaster)

Aggregations

Broadcaster (org.atmosphere.runtime.Broadcaster)1 BroadcasterListener (org.atmosphere.runtime.BroadcasterListener)1