use of org.jvnet.hk2.guice.bridge.api.HK2IntoGuiceBridge in project graylog2-server by Graylog2.
the class Graylog2ServiceLocatorGenerator method create.
@Override
public ServiceLocator create(String name, ServiceLocator parent) {
final ServiceLocator serviceLocator = super.create(name, parent);
final Injector injector = GuiceInjectorHolder.getInjector().createChildInjector(new HK2IntoGuiceBridge(serviceLocator));
GuiceBridge.getGuiceBridge().initializeGuiceBridge(serviceLocator);
final GuiceIntoHK2Bridge guiceBridge = serviceLocator.getService(GuiceIntoHK2Bridge.class);
guiceBridge.bridgeGuiceInjector(injector);
return serviceLocator;
}
Aggregations