use of org.glassfish.hk2.api.IndexedFilter in project Payara by payara.
the class HK2DomConfigUtilities method addIfNotThere.
private static boolean addIfNotThere(ServiceLocator locator, DynamicConfiguration config, DescriptorImpl desc, HK2Loader loader) {
IndexedFilter filter = BuilderHelper.createContractFilter(desc.getImplementation());
if (locator.getBestDescriptor(filter) != null)
return false;
if (loader != null) {
desc.setLoader(loader);
}
config.bind(desc);
return true;
}
use of org.glassfish.hk2.api.IndexedFilter in project Payara by payara.
the class GlassfishNetworkListener method stop.
@Override
public void stop() throws IOException {
ServiceLocator locator = grizzlyService.getHabitat();
IndexedFilter removeFilter = BuilderHelper.createNameAndContractFilter(Mapper.class.getName(), (address.toString() + port));
DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class);
DynamicConfiguration config = dcs.createDynamicConfiguration();
config.addUnbindFilter(removeFilter);
config.commit();
unregisterMonitoringStatsProviders();
super.stop();
}
Aggregations