/** * Resolve the {@link FilterUrlMappingsProvider} service via hk2. * * Will only work in Servlet 3 container, as the older API version * does not provide access to the filter mapping structure. * * @return {@code FilterContextPath} instance, if available, {@code null} otherwise. */ private FilterUrlMappingsProvider getFilterUrlMappingsProvider() { FilterUrlMappingsProvider filterUrlMappingsProvider = null; final Iterator<FilterUrlMappingsProvider> providers = Providers.getAllProviders( getApplicationHandler().getInjectionManager(), FilterUrlMappingsProvider.class).iterator(); if (providers.hasNext()) { filterUrlMappingsProvider = providers.next(); } return filterUrlMappingsProvider; }
/** * Resolve the {@link FilterUrlMappingsProvider} service via hk2. * * Will only work in Servlet 3 container, as the older API version * does not provide access to the filter mapping structure. * * @return {@code FilterContextPath} instance, if available, {@code null} otherwise. */ private FilterUrlMappingsProvider getFilterUrlMappingsProvider() { FilterUrlMappingsProvider filterUrlMappingsProvider = null; final Iterator<FilterUrlMappingsProvider> providers = Providers.getAllProviders( getApplicationHandler().getInjectionManager(), FilterUrlMappingsProvider.class).iterator(); if (providers.hasNext()) { filterUrlMappingsProvider = providers.next(); } return filterUrlMappingsProvider; }
@Override public ServiceLocator get() { ServletContainer container = (ServletContainer) environment.getJerseyServletContainer(); checkState(container != null, "Servlet-container not ready"); return container.getApplicationHandler().getServiceLocator(); } }
/** * Resolve the {@link FilterUrlMappingsProvider} service via hk2. * * Will only work in Servlet 3 container, as the older API version * does not provide access to the filter mapping structure. * * @return {@code FilterContextPath} instance, if available, {@code null} otherwise. */ private FilterUrlMappingsProvider getFilterUrlMappingsProvider() { FilterUrlMappingsProvider filterUrlMappingsProvider = null; final Iterator<FilterUrlMappingsProvider> providers = Providers.getAllProviders( getApplicationHandler().getServiceLocator(), FilterUrlMappingsProvider.class).iterator(); if (providers.hasNext()) { filterUrlMappingsProvider = providers.next(); } return filterUrlMappingsProvider; }
/** * Resolve the {@link FilterUrlMappingsProvider} service via hk2. * * Will only work in Servlet 3 container, as the older API version * does not provide access to the filter mapping structure. * * @return {@code FilterContextPath} instance, if available, {@code null} otherwise. */ private FilterUrlMappingsProvider getFilterUrlMappingsProvider() { FilterUrlMappingsProvider filterUrlMappingsProvider = null; final Iterator<FilterUrlMappingsProvider> providers = Providers.getAllProviders( getApplicationHandler().getServiceLocator(), FilterUrlMappingsProvider.class).iterator(); if (providers.hasNext()) { filterUrlMappingsProvider = providers.next(); } return filterUrlMappingsProvider; }
/** * Resolve the {@link FilterUrlMappingsProvider} service via hk2. * * Will only work in Servlet 3 container, as the older API version * does not provide access to the filter mapping structure. * * @return {@code FilterContextPath} instance, if available, {@code null} otherwise. */ private FilterUrlMappingsProvider getFilterUrlMappingsProvider() { FilterUrlMappingsProvider filterUrlMappingsProvider = null; final Iterator<FilterUrlMappingsProvider> providers = Providers.getAllProviders( getApplicationHandler().getServiceLocator(), FilterUrlMappingsProvider.class).iterator(); if (providers.hasNext()) { filterUrlMappingsProvider = providers.next(); } return filterUrlMappingsProvider; }
/** * Resolve the {@link FilterUrlMappingsProvider} service via hk2. * * Will only work in Servlet 3 container, as the older API version * does not provide access to the filter mapping structure. * * @return {@code FilterContextPath} instance, if available, {@code null} otherwise. */ private FilterUrlMappingsProvider getFilterUrlMappingsProvider() { FilterUrlMappingsProvider filterUrlMappingsProvider = null; final Iterator<FilterUrlMappingsProvider> providers = Providers.getAllProviders( getApplicationHandler().getInjectionManager(), FilterUrlMappingsProvider.class).iterator(); if (providers.hasNext()) { filterUrlMappingsProvider = providers.next(); } return filterUrlMappingsProvider; }