Class JerseyProxyResolver
- java.lang.Object
-
- org.glassfish.jersey.inject.cdi.se.injector.JerseyProxyResolver
-
public class JerseyProxyResolver extends Object
Class working with JAX-RS/Jersey types injected usingContextannotation and all other types which can be injected using using other*Paramannotations.Processed JAX-RS interfaces:
- Author:
- Petr Bouda
- See Also:
UriInfo,Request,HttpHeaders,SecurityContext,Configuration,not proxiable because is registered as a singleton.,Providers
-
-
Constructor Summary
Constructors Constructor Description JerseyProxyResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisPrixiable(Class<? extends Annotation> scopeAnnotation)Returnstrueif one of the proxiable annotations is present on the clazz.booleanisPrixiable(Injectee injectee)Returnstrueif one of the proxiable annotations is present on the clazz into which values are injected.ObjectnoCachedProxy(Injectee injectee, Supplier<Object> supplier)Returns a proxy (newly created or cached) which is able to call the givenSupplier.Objectproxy(Injectee injectee, InjectionResolver resolver)Returns a proxy (newly created or cached) which is able to callInjectionResolverwith the givenInjecteeto get the value in proper scope.
-
-
-
Method Detail
-
isPrixiable
public boolean isPrixiable(Injectee injectee)
Returnstrueif one of the proxiable annotations is present on the clazz into which values are injected.In these cases the value is not proxiable:
- Class without the annotation
- Class annotated by
RequestScoped - Class annotated by
RequestScoped
- Parameters:
injectee- information about the injection point.- Returns:
trueif contains one proxiable annotation at least.
-
isPrixiable
public boolean isPrixiable(Class<? extends Annotation> scopeAnnotation)
Returnstrueif one of the proxiable annotations is present on the clazz.In these cases the value is not proxiable:
- Class without the annotation
- Class annotated by
RequestScoped - Class annotated by
RequestScoped
- Parameters:
scopeAnnotation- annotation belonging to the scope of the class.- Returns:
trueif contains one proxiable annotation at least.
-
proxy
public Object proxy(Injectee injectee, InjectionResolver resolver)
Returns a proxy (newly created or cached) which is able to callInjectionResolverwith the givenInjecteeto get the value in proper scope.- Parameters:
injectee- information about the injection point.resolver- dedicated resolver which find the value.- Returns:
- created proxy which resolve the value in the proper scope.
-
noCachedProxy
public Object noCachedProxy(Injectee injectee, Supplier<Object> supplier)
Returns a proxy (newly created or cached) which is able to call the givenSupplier. This method does not cache a result.- Parameters:
injectee- information about the injection point.supplier- supplier called using the proxy.- Returns:
- created proxy which resolve the value in the proper scope.
-
-