use of org.atmosphere.runtime.AtmosphereObjectFactory in project atmosphere by Atmosphere.
the class Utils method inject.
public static final void inject(AtmosphereResource r) throws IllegalAccessException {
AtmosphereConfig config = r.getAtmosphereConfig();
// No Injectable supports Injection
if (config.properties().get(NEED_RUNTIME_INJECTION) == null) {
return;
}
AtmosphereObjectFactory injectableFactory = config.framework().objectFactory();
if (!InjectableObjectFactory.class.isAssignableFrom(injectableFactory.getClass())) {
return;
}
Object injectIn = injectWith(r);
if (injectIn != null) {
inject(injectIn, injectIn.getClass(), r);
}
}
Aggregations