Class ProcessingProvidersConfigurator
java.lang.Object
org.glassfish.jersey.server.ProcessingProvidersConfigurator
- All Implemented Interfaces:
BootstrapConfigurator
Configurator which initializes and register
ProcessingProviders instance into BootstrapBag.
Instances of these interfaces are processed, configured and provided using this configurator:
ContainerRequestFilterContainerResponseFilterReaderInterceptorWriterInterceptorDynamicFeature
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> javax.ws.rs.core.MultivaluedMap<Class<? extends Annotation>, RankedProvider<T>> filterNameBound(Iterable<RankedProvider<T>> all, Collection<RankedProvider<javax.ws.rs.container.ContainerRequestFilter>> preMatchingFilters, ComponentBag componentBag, Collection<Class<? extends Annotation>> applicationNameBindings, javax.ws.rs.core.MultivaluedMap<RankedProvider<T>, Class<? extends Annotation>> inverseNameBoundMap) Takes collection of all filters/interceptors (either request/reader or response/writer) and separates out all name-bound filters/interceptors, returns them as a separate MultivaluedMap, mapping the name-bound annotation to the list of name-bound filters/interceptors.voidinit(InjectionManager injectionManager, BootstrapBag bootstrapBag) Pre-initialization method should only register services intoInjectionManagerand populateBootstrapBag.voidpostInit(InjectionManager injectionManager, BootstrapBag bootstrapBag) Post-initialization method can get services fromInjectionManagerand is not able to register the new one because injection manager is already completed.
-
Field Details
-
LOGGER
-
-
Constructor Details
-
ProcessingProvidersConfigurator
ProcessingProvidersConfigurator()
-
-
Method Details
-
init
Description copied from interface:BootstrapConfiguratorPre-initialization method should only register services intoInjectionManagerand populateBootstrapBag.- Specified by:
initin interfaceBootstrapConfigurator- Parameters:
injectionManager- not completed injection manager.bootstrapBag- bootstrap bag with services used in following processing.
-
postInit
Description copied from interface:BootstrapConfiguratorPost-initialization method can get services fromInjectionManagerand is not able to register the new one because injection manager is already completed.- Specified by:
postInitin interfaceBootstrapConfigurator- Parameters:
injectionManager- already completed injection manager.bootstrapBag- bootstrap bag with services used in following processing.
-
filterNameBound
private static <T> javax.ws.rs.core.MultivaluedMap<Class<? extends Annotation>, RankedProvider<T>> filterNameBound(Iterable<RankedProvider<T>> all, Collection<RankedProvider<javax.ws.rs.container.ContainerRequestFilter>> preMatchingFilters, ComponentBag componentBag, Collection<Class<? extends Annotation>> applicationNameBindings, javax.ws.rs.core.MultivaluedMap<RankedProvider<T>, Class<? extends Annotation>> inverseNameBoundMap) Takes collection of all filters/interceptors (either request/reader or response/writer) and separates out all name-bound filters/interceptors, returns them as a separate MultivaluedMap, mapping the name-bound annotation to the list of name-bound filters/interceptors. The same key values are also added into the inverse map passed ininverseNameBoundMap. Note, the name-bound filters/interceptors are removed from the original filters/interceptors collection. If non-null collection is passed in the postMatching parameter (applicable for filters only), this method also removes all the global postMatching filters from the original collection and adds them to the collection passed in the postMatching parameter.- Parameters:
all- Collection of all filters to be processed.preMatchingFilters- Collection into which pre-matching filters should be added.componentBag- Component bagapplicationNameBindings- Collection of name binding annotations attached to the JAX-RS application.inverseNameBoundMap- Inverse name bound map into which the name bound providers should be inserted. The keys are providers (filters, interceptor)- Returns:
MultivaluedMapof all name-bound filters.
-