class ProcessingProvidersConfigurator extends java.lang.Object implements BootstrapConfigurator
ProcessingProviders
instance into BootstrapBag
.
Instances of these interfaces are processed, configured and provided using this configurator:
ContainerRequestFilter
ContainerResponseFilter
ReaderInterceptor
WriterInterceptor
DynamicFeature
Modifier and Type | Field and Description |
---|---|
private static java.util.logging.Logger |
LOGGER |
Constructor and Description |
---|
ProcessingProvidersConfigurator() |
Modifier and Type | Method and Description |
---|---|
private static <T> javax.ws.rs.core.MultivaluedMap<java.lang.Class<? extends java.lang.annotation.Annotation>,RankedProvider<T>> |
filterNameBound(java.lang.Iterable<RankedProvider<T>> all,
java.util.Collection<RankedProvider<javax.ws.rs.container.ContainerRequestFilter>> preMatchingFilters,
ComponentBag componentBag,
java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> applicationNameBindings,
javax.ws.rs.core.MultivaluedMap<RankedProvider<T>,java.lang.Class<? extends java.lang.annotation.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.
|
void |
init(InjectionManager injectionManager,
BootstrapBag bootstrapBag)
Pre-initialization method should only register services into
InjectionManager and populate BootstrapBag . |
void |
postInit(InjectionManager injectionManager,
BootstrapBag bootstrapBag)
Post-initialization method can get services from
InjectionManager and is not able to register the new one because
injection manager is already completed. |
public void init(InjectionManager injectionManager, BootstrapBag bootstrapBag)
BootstrapConfigurator
InjectionManager
and populate BootstrapBag
.init
in interface BootstrapConfigurator
injectionManager
- not completed injection manager.bootstrapBag
- bootstrap bag with services used in following processing.public void postInit(InjectionManager injectionManager, BootstrapBag bootstrapBag)
BootstrapConfigurator
InjectionManager
and is not able to register the new one because
injection manager is already completed.postInit
in interface BootstrapConfigurator
injectionManager
- already completed injection manager.bootstrapBag
- bootstrap bag with services used in following processing.private static <T> javax.ws.rs.core.MultivaluedMap<java.lang.Class<? extends java.lang.annotation.Annotation>,RankedProvider<T>> filterNameBound(java.lang.Iterable<RankedProvider<T>> all, java.util.Collection<RankedProvider<javax.ws.rs.container.ContainerRequestFilter>> preMatchingFilters, ComponentBag componentBag, java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> applicationNameBindings, javax.ws.rs.core.MultivaluedMap<RankedProvider<T>,java.lang.Class<? extends java.lang.annotation.Annotation>> inverseNameBoundMap)
inverseNameBoundMap
.
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.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)MultivaluedMap
of all name-bound filters.