Class ServerScopeProvider
java.lang.Object
org.glassfish.jersey.message.filtering.CommonScopeProvider
org.glassfish.jersey.message.filtering.ServerScopeProvider
- All Implemented Interfaces:
ScopeProvider
- Direct Known Subclasses:
SecurityServerScopeProvider
@Singleton
@Priority(4200)
@ConstrainedTo(SERVER)
class ServerScopeProvider
extends CommonScopeProvider
Server-side implementation of
scope provider
. In addition to
base implementation
this class provides entity-filtering scopes by examining matched resource
method and sub-resource locators. This examination comes into play only in case if entity-filtering scopes cannot be found in
entity annotations or application configuration.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate javax.inject.Provider
<ExtendedUriInfo> private final ConcurrentMap
<String, Set<String>> Fields inherited from interface org.glassfish.jersey.message.filtering.spi.ScopeProvider
DEFAULT_SCOPE
-
Constructor Summary
ConstructorsConstructorDescriptionServerScopeProvider
(javax.ws.rs.core.Configuration config, InjectionManager injectionManager) Create new server scope provider with injectedconfiguration
andjersey injection manager
. -
Method Summary
Modifier and TypeMethodDescriptiongetFilteringScopes
(Annotation[] entityAnnotations, boolean defaultIfNotFound) Get entity-filtering scopes to be used to process an entity.getFilteringScopes
(Method resourceMethod, Class<?> resourceClass) Get entity-filtering scopes from examining annotations present on resource method and resource class.private static List
<ResourceMethod> getMatchedMethods
(ExtendedUriInfo uriInfo) Methods inherited from class org.glassfish.jersey.message.filtering.CommonScopeProvider
getFilteringScopes, mergeFilteringScopes, returnFilteringScopes
-
Field Details
-
uriInfoProvider
-
uriToContexts
-
-
Constructor Details
-
ServerScopeProvider
@Inject public ServerScopeProvider(javax.ws.rs.core.Configuration config, InjectionManager injectionManager) Create new server scope provider with injectedconfiguration
andjersey injection manager
.
-
-
Method Details
-
getFilteringScopes
Description copied from interface:ScopeProvider
Get entity-filtering scopes to be used to process an entity.- Specified by:
getFilteringScopes
in interfaceScopeProvider
- Overrides:
getFilteringScopes
in classCommonScopeProvider
- Parameters:
entityAnnotations
- entity annotations provided with entity when creating request/response.defaultIfNotFound
- flag determining whether the default entity-filtering scope should be returned if no other scope can be obtained.- Returns:
- non-null entity-filtering scopes.
-
getFilteringScopes
Get entity-filtering scopes from examining annotations present on resource method and resource class.- Parameters:
resourceMethod
- matched resource method to be examined.resourceClass
- matched resource class to be examined.- Returns:
- entity-filtering scopes or an empty set if the scopes cannot be obtained.
-
getMatchedMethods
-