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 using Context annotation and all other types which can be injected using using other *Param annotations.

Processed JAX-RS interfaces:

Author:
Petr Bouda
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isPrixiable(Class<? extends Annotation> scopeAnnotation)
    Returns true if one of the proxiable annotations is present on the clazz.
    boolean
    isPrixiable(org.glassfish.jersey.internal.inject.Injectee injectee)
    Returns true if one of the proxiable annotations is present on the clazz into which values are injected.
    noCachedProxy(org.glassfish.jersey.internal.inject.Injectee injectee, Supplier<Object> supplier)
    Returns a proxy (newly created or cached) which is able to call the given Supplier.
    proxy(org.glassfish.jersey.internal.inject.Injectee injectee, org.glassfish.jersey.internal.inject.InjectionResolver resolver)
    Returns a proxy (newly created or cached) which is able to call InjectionResolver with the given Injectee to get the value in proper scope.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JerseyProxyResolver

      public JerseyProxyResolver()
  • Method Details

    • isPrixiable

      public boolean isPrixiable(org.glassfish.jersey.internal.inject.Injectee injectee)
      Returns true if 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:
        true if contains one proxiable annotation at least.
      • isPrixiable

        public boolean isPrixiable(Class<? extends Annotation> scopeAnnotation)
        Returns true if 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:
          true if contains one proxiable annotation at least.
        • proxy

          public Object proxy(org.glassfish.jersey.internal.inject.Injectee injectee, org.glassfish.jersey.internal.inject.InjectionResolver resolver)
          Returns a proxy (newly created or cached) which is able to call InjectionResolver with the given Injectee to 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(org.glassfish.jersey.internal.inject.Injectee injectee, Supplier<Object> supplier)
          Returns a proxy (newly created or cached) which is able to call the given Supplier. 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.