org.glassfish.jersey.server.ExtendedResourceContext Java Examples
The following examples show how to use
org.glassfish.jersey.server.ExtendedResourceContext.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JerseyRouteExecutionStrategyUtils.java From servicetalk with Apache License 2.0 | 6 votes |
static RouteStrategiesConfig validateRouteStrategies( final ApplicationHandler applicationHandler, final RouteExecutionStrategyFactory<HttpExecutionStrategy> strategyFactory) { final ExtendedResourceContext resourceContext = applicationHandler.getInjectionManager().getInstance(ExtendedResourceContext.class); if (resourceContext == null) { return new RouteStrategiesConfig(emptyMap(), emptyMap()); } final RouteExecutionStrategyValidator validator = new RouteExecutionStrategyValidator(strategyFactory); resourceContext.getResourceModel().accept(validator); if (!validator.errors.isEmpty()) { throw new IllegalArgumentException("Invalid execution strategy configuration found:\n" + validator.errors); } return new RouteStrategiesConfig(validator.routeStrategies, validator.methodDefaultStrategies); }
Example #2
Source File: InternalFilter.java From soabase with Apache License 2.0 | 4 votes |
ExtendedResourceContext getResourceContext() { return resourceContext; }
Example #3
Source File: JerseyGuiceModule.java From soabase with Apache License 2.0 | 4 votes |
@Provides @RequestScoped public ExtendedResourceContext providesExtendedResourceContext() { return filter.getResourceContext(); }