Interface JaxrsClientReactiveEnricher


  • public interface JaxrsClientReactiveEnricher
    Alter jaxrs client proxy generation
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void forClass​(io.quarkus.gizmo.MethodCreator ctor, io.quarkus.gizmo.AssignableResultHandle globalTarget, org.jboss.jandex.ClassInfo interfaceClass, org.jboss.jandex.IndexView index)
      Class-level alterations Used by MicroProfile Rest Client implementation (quarkus-rest-client-reactive) to support Provider, @ClientHeadersFactory, etc Please note that this won't be invoked for sub-resources
      void forMethod​(io.quarkus.gizmo.ClassCreator classCreator, io.quarkus.gizmo.MethodCreator constructor, io.quarkus.gizmo.MethodCreator clinit, io.quarkus.gizmo.MethodCreator methodCreator, org.jboss.jandex.ClassInfo interfaceClass, org.jboss.jandex.MethodInfo method, io.quarkus.gizmo.AssignableResultHandle invocationBuilder, org.jboss.jandex.IndexView index, io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.GeneratedClassBuildItem> generatedClasses, int methodIndex, io.quarkus.gizmo.FieldDescriptor javaMethodField)
      Method-level alterations
      void forSubResourceMethod​(io.quarkus.gizmo.ClassCreator subClassCreator, io.quarkus.gizmo.MethodCreator subConstructor, io.quarkus.gizmo.MethodCreator subClinit, io.quarkus.gizmo.MethodCreator subMethodCreator, org.jboss.jandex.ClassInfo rootInterfaceClass, org.jboss.jandex.ClassInfo subInterfaceClass, org.jboss.jandex.MethodInfo subMethod, org.jboss.jandex.MethodInfo rootMethod, io.quarkus.gizmo.AssignableResultHandle invocationBuilder, org.jboss.jandex.IndexView index, io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.GeneratedClassBuildItem> generatedClasses, int methodIndex, int subMethodIndex, io.quarkus.gizmo.FieldDescriptor javaMethodField)
      Method-level alterations for methods of sub-resources
      void forSubResourceWebTarget​(io.quarkus.gizmo.MethodCreator methodCreator, org.jboss.jandex.IndexView index, org.jboss.jandex.ClassInfo rootInterfaceClass, org.jboss.jandex.ClassInfo subInterfaceClass, org.jboss.jandex.MethodInfo rootMethod, org.jboss.jandex.MethodInfo subMethod, io.quarkus.gizmo.AssignableResultHandle webTarget, io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.GeneratedClassBuildItem> generatedClasses)
      Called when a WebTarget has been populated for a sub Client
      void forWebTarget​(io.quarkus.gizmo.MethodCreator methodCreator, org.jboss.jandex.IndexView index, org.jboss.jandex.ClassInfo interfaceClass, org.jboss.jandex.MethodInfo method, io.quarkus.gizmo.AssignableResultHandle webTarget, io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.GeneratedClassBuildItem> generatedClasses)
      Called when a WebTarget has been populated for a normal Client
    • Method Detail

      • forClass

        void forClass​(io.quarkus.gizmo.MethodCreator ctor,
                      io.quarkus.gizmo.AssignableResultHandle globalTarget,
                      org.jboss.jandex.ClassInfo interfaceClass,
                      org.jboss.jandex.IndexView index)
        Class-level alterations Used by MicroProfile Rest Client implementation (quarkus-rest-client-reactive) to support Provider, @ClientHeadersFactory, etc Please note that this won't be invoked for sub-resources
        Parameters:
        ctor - jaxrs client constructor
        globalTarget - WebTarget field of the jaxrs client
        interfaceClass - JAXRS-annotated interface for which the client is being generated
        index - jandex index
      • forWebTarget

        void forWebTarget​(io.quarkus.gizmo.MethodCreator methodCreator,
                          org.jboss.jandex.IndexView index,
                          org.jboss.jandex.ClassInfo interfaceClass,
                          org.jboss.jandex.MethodInfo method,
                          io.quarkus.gizmo.AssignableResultHandle webTarget,
                          io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.GeneratedClassBuildItem> generatedClasses)
        Called when a WebTarget has been populated for a normal Client
      • forSubResourceWebTarget

        void forSubResourceWebTarget​(io.quarkus.gizmo.MethodCreator methodCreator,
                                     org.jboss.jandex.IndexView index,
                                     org.jboss.jandex.ClassInfo rootInterfaceClass,
                                     org.jboss.jandex.ClassInfo subInterfaceClass,
                                     org.jboss.jandex.MethodInfo rootMethod,
                                     org.jboss.jandex.MethodInfo subMethod,
                                     io.quarkus.gizmo.AssignableResultHandle webTarget,
                                     io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.GeneratedClassBuildItem> generatedClasses)
        Called when a WebTarget has been populated for a sub Client
      • forMethod

        void forMethod​(io.quarkus.gizmo.ClassCreator classCreator,
                       io.quarkus.gizmo.MethodCreator constructor,
                       io.quarkus.gizmo.MethodCreator clinit,
                       io.quarkus.gizmo.MethodCreator methodCreator,
                       org.jboss.jandex.ClassInfo interfaceClass,
                       org.jboss.jandex.MethodInfo method,
                       io.quarkus.gizmo.AssignableResultHandle invocationBuilder,
                       org.jboss.jandex.IndexView index,
                       io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.GeneratedClassBuildItem> generatedClasses,
                       int methodIndex,
                       io.quarkus.gizmo.FieldDescriptor javaMethodField)
        Method-level alterations
        Parameters:
        classCreator - creator of the jaxrs stub class
        constructor - constructor of the jaxrs stub class
        methodCreator - the method that is being generated, e.g. a method corresponding to `@GET Response get()`
        interfaceClass - JAXRS-annotated interface for which the client is being generated
        method - jandex method object corresponding to the method
        invocationBuilder - assignable reference for Invocation.Builder
        index - jandex index
        generatedClasses - build producer used to generate classes. Used e.g. to generate classes for header filling
        methodIndex - 0-based index of the method in the interface. Used to assure there is no clash in generating classes
        javaMethodField - method reference in a static class field
      • forSubResourceMethod

        void forSubResourceMethod​(io.quarkus.gizmo.ClassCreator subClassCreator,
                                  io.quarkus.gizmo.MethodCreator subConstructor,
                                  io.quarkus.gizmo.MethodCreator subClinit,
                                  io.quarkus.gizmo.MethodCreator subMethodCreator,
                                  org.jboss.jandex.ClassInfo rootInterfaceClass,
                                  org.jboss.jandex.ClassInfo subInterfaceClass,
                                  org.jboss.jandex.MethodInfo subMethod,
                                  org.jboss.jandex.MethodInfo rootMethod,
                                  io.quarkus.gizmo.AssignableResultHandle invocationBuilder,
                                  org.jboss.jandex.IndexView index,
                                  io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.GeneratedClassBuildItem> generatedClasses,
                                  int methodIndex,
                                  int subMethodIndex,
                                  io.quarkus.gizmo.FieldDescriptor javaMethodField)
        Method-level alterations for methods of sub-resources
        Parameters:
        subClassCreator - creator of the sub-resource stub class
        subConstructor - constructor of the sub-resource stub class
        subMethodCreator - the method that is being generated
        rootInterfaceClass - root JAX-RS interface for which the client is being generated
        subInterfaceClass - sub-resource JAX-RS interface for which the client is being generated
        subMethod - jandex method object corresponding to the current sub-resource method
        rootMethod - jandex method object corresponding to the current root resource method
        invocationBuilder - Invocation.Builder's assignable reference. Local for subMethod
        index - jandex index
        generatedClasses - build producer used to generate classes
        methodIndex - 0-based index of method in the root interface
        subMethodIndex - index of the method in the sub-resource interface
        javaMethodField - method reference in a static class field