/** * Private constructor. * * @param parent parent of type {@link org.glassfish.jersey.internal.inject.InjectionManager} or {@link ServiceLocator}. */ AbstractHk2InjectionManager(Object parent) { ServiceLocator parentLocator = resolveServiceLocatorParent(parent); this.locator = createLocator(parentLocator); // Register all components needed for proper HK2 locator bootstrap ServiceLocatorUtilities.bind(locator, new Hk2BootstrapBinder(locator)); this.locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME); // clear HK2 caches ServiceLocatorRuntimeBean serviceLocatorRuntimeBean = locator.getService(ServiceLocatorRuntimeBean.class); if (serviceLocatorRuntimeBean != null) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine(LocalizationMessages.HK_2_CLEARING_CACHE(serviceLocatorRuntimeBean.getServiceCacheSize(), serviceLocatorRuntimeBean.getReflectionCacheSize())); } serviceLocatorRuntimeBean.clearReflectionCache(); serviceLocatorRuntimeBean.clearServiceCache(); } }
/** * Private constructor. * * @param parent parent of type {@link org.glassfish.jersey.internal.inject.InjectionManager} or {@link ServiceLocator}. */ AbstractHk2InjectionManager(Object parent) { ServiceLocator parentLocator = resolveServiceLocatorParent(parent); this.locator = createLocator(parentLocator); // Register all components needed for proper HK2 locator bootstrap ServiceLocatorUtilities.bind(locator, new Hk2BootstrapBinder(locator)); this.locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME); // clear HK2 caches ServiceLocatorRuntimeBean serviceLocatorRuntimeBean = locator.getService(ServiceLocatorRuntimeBean.class); if (serviceLocatorRuntimeBean != null) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine(LocalizationMessages.HK_2_CLEARING_CACHE(serviceLocatorRuntimeBean.getServiceCacheSize(), serviceLocatorRuntimeBean.getReflectionCacheSize())); } serviceLocatorRuntimeBean.clearReflectionCache(); serviceLocatorRuntimeBean.clearServiceCache(); } }
@Override public void setDefaultClassAnalyzerName(String s) { delegate.setDefaultClassAnalyzerName(s); }
@Override public void setDefaultClassAnalyzerName(String defaultClassAnalyzer) { delegate.setDefaultClassAnalyzerName(defaultClassAnalyzer); }
/** * Private constructor. * * @param parent parent of type {@link org.glassfish.jersey.internal.inject.InjectionManager} or {@link ServiceLocator}. */ AbstractHk2InjectionManager(Object parent) { ServiceLocator parentLocator = resolveServiceLocatorParent(parent); this.locator = createLocator(parentLocator); // Register all components needed for proper HK2 locator bootstrap ServiceLocatorUtilities.bind(locator, new Hk2BootstrapBinder(locator)); this.locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME); // clear HK2 caches ServiceLocatorRuntimeBean serviceLocatorRuntimeBean = locator.getService(ServiceLocatorRuntimeBean.class); if (serviceLocatorRuntimeBean != null) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine(LocalizationMessages.HK_2_CLEARING_CACHE(serviceLocatorRuntimeBean.getServiceCacheSize(), serviceLocatorRuntimeBean.getReflectionCacheSize())); } serviceLocatorRuntimeBean.clearReflectionCache(); serviceLocatorRuntimeBean.clearServiceCache(); } }
/** * Private constructor. * * @param parent parent of type {@link org.glassfish.jersey.internal.inject.InjectionManager} or {@link ServiceLocator}. */ AbstractHk2InjectionManager(Object parent) { ServiceLocator parentLocator = resolveServiceLocatorParent(parent); this.locator = createLocator(parentLocator); // Register all components needed for proper HK2 locator bootstrap ServiceLocatorUtilities.bind(locator, new Hk2BootstrapBinder(locator)); this.locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME); // clear HK2 caches ServiceLocatorRuntimeBean serviceLocatorRuntimeBean = locator.getService(ServiceLocatorRuntimeBean.class); if (serviceLocatorRuntimeBean != null) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine(LocalizationMessages.HK_2_CLEARING_CACHE(serviceLocatorRuntimeBean.getServiceCacheSize(), serviceLocatorRuntimeBean.getReflectionCacheSize())); } serviceLocatorRuntimeBean.clearReflectionCache(); serviceLocatorRuntimeBean.clearServiceCache(); } }
/** * Create a new Jersey server-side application handler configured by a * {@link Application JAX-RS Application (sub-)class}. * * @param jaxrsApplicationClass JAX-RS {@code Application} (sub-)class that will be * instantiated and used to configure the new Jersey * application handler. */ public ApplicationHandler(final Class<? extends Application> jaxrsApplicationClass) { this.locator = Injections.createLocator(new ServerBinder(null), new ApplicationBinder()); locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME); final LazyValue<Iterable<ComponentProvider>> componentProviders = getLazyInitializedComponentProviders(locator); this.application = createApplication(jaxrsApplicationClass, componentProviders); this.runtimeConfig = ResourceConfig.createRuntimeConfig(application); this.runtime = Errors.processWithException(new Producer<ServerRuntime>() { @Override public ServerRuntime call() { return initialize(componentProviders.get()); } }); this.containerLifecycleListeners = Providers.getAllProviders(locator, ContainerLifecycleListener.class); }
/** * Create a new Jersey server-side application handler configured by a * {@link Application JAX-RS Application (sub-)class}. * * @param jaxrsApplicationClass JAX-RS {@code Application} (sub-)class that will be * instantiated and used to configure the new Jersey * application handler. */ public ApplicationHandler(final Class<? extends Application> jaxrsApplicationClass) { this.locator = Injections.createLocator(new ServerBinder(null), new ApplicationBinder()); locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME); final LazyValue<Iterable<ComponentProvider>> componentProviders = getLazyInitializedComponentProviders(locator); this.application = createApplication(jaxrsApplicationClass, componentProviders); this.runtimeConfig = ResourceConfig.createRuntimeConfig(application); this.runtime = Errors.processWithException(new Producer<ServerRuntime>() { @Override public ServerRuntime call() { return initialize(componentProviders.get()); } }); this.containerLifecycleListeners = Providers.getAllProviders(locator, ContainerLifecycleListener.class); }
/** * Create a new Jersey server-side application handler configured by a * {@link Application JAX-RS Application (sub-)class}. * * @param jaxrsApplicationClass JAX-RS {@code Application} (sub-)class that will be * instantiated and used to configure the new Jersey * application handler. */ public ApplicationHandler(final Class<? extends Application> jaxrsApplicationClass) { this.locator = Injections.createLocator(new ServerBinder(null), new ApplicationBinder()); locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME); final LazyValue<Iterable<ComponentProvider>> componentProviders = getLazyInitializedComponentProviders(locator); this.application = createApplication(jaxrsApplicationClass, componentProviders); this.runtimeConfig = ResourceConfig.createRuntimeConfig(application); this.runtime = Errors.processWithException(new Producer<ServerRuntime>() { @Override public ServerRuntime call() { return initialize(componentProviders.get()); } }); this.containerLifecycleListeners = Providers.getAllProviders(locator, ContainerLifecycleListener.class); }
customBinder); locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME); final LazyValue<Iterable<ComponentProvider>> componentProviders = getLazyInitializedComponentProviders(locator);
customBinder); locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME); final LazyValue<Iterable<ComponentProvider>> componentProviders = getLazyInitializedComponentProviders(locator);
customBinder); locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME); final LazyValue<Iterable<ComponentProvider>> componentProviders = getLazyInitializedComponentProviders(locator);
locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME);
locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME);
locator.setDefaultClassAnalyzerName(JerseyClassAnalyzer.NAME);