use of org.talend.sdk.component.runtime.manager.service.ResolverImpl in project component-runtime by Talend.
the class ComponentManager method containerServices.
protected void containerServices(final Container container, final Map<Class<?>, Object> services) {
// note: we can move it to manager instances at some point
final JsonProvider jsonpProvider = new PreComputedJsonpProvider(container.getId(), this.jsonpProvider, jsonpParserFactory, jsonpWriterFactory, jsonpBuilderFactory, jsonpGeneratorFactory, jsonpReaderFactory);
services.put(JsonProvider.class, jsonpProvider);
services.put(JsonBuilderFactory.class, javaProxyEnricherFactory.asSerializable(container.getLoader(), container.getId(), JsonBuilderFactory.class.getName(), jsonpBuilderFactory));
services.put(JsonParserFactory.class, javaProxyEnricherFactory.asSerializable(container.getLoader(), container.getId(), JsonParserFactory.class.getName(), jsonpParserFactory));
services.put(JsonReaderFactory.class, javaProxyEnricherFactory.asSerializable(container.getLoader(), container.getId(), JsonReaderFactory.class.getName(), jsonpReaderFactory));
services.put(JsonWriterFactory.class, javaProxyEnricherFactory.asSerializable(container.getLoader(), container.getId(), JsonWriterFactory.class.getName(), jsonpWriterFactory));
services.put(JsonGeneratorFactory.class, javaProxyEnricherFactory.asSerializable(container.getLoader(), container.getId(), JsonGeneratorFactory.class.getName(), jsonpGeneratorFactory));
final Jsonb jsonb = jsonbProvider.create().withProvider(// reuses the same memory buffering
jsonpProvider).withConfig(new JsonbConfig().setProperty("johnzon.cdi.activated", false)).build();
final Jsonb serializableJsonb = Jsonb.class.cast(javaProxyEnricherFactory.asSerializable(container.getLoader(), container.getId(), Jsonb.class.getName(), jsonb));
services.put(Jsonb.class, serializableJsonb);
// not JSON services
services.put(HttpClientFactory.class, new HttpClientFactoryImpl(container.getId(), reflections, serializableJsonb, services));
services.put(LocalCache.class, new LocalCacheService(container.getId()));
services.put(LocalConfiguration.class, new LocalConfigurationService(createRawLocalConfigurations(), container.getId()));
services.put(ProxyGenerator.class, proxyGenerator);
services.put(Resolver.class, new ResolverImpl(container.getId(), container.getLocalDependencyRelativeResolver()));
}
Aggregations