Class OpenTracingJaxwsCdiUtils


  • public class OpenTracingJaxwsCdiUtils
    extends Object
    • Constructor Detail

      • OpenTracingJaxwsCdiUtils

        public OpenTracingJaxwsCdiUtils()
    • Method Detail

      • getAnnotation

        public static <A extends Annotation> A getAnnotation​(jakarta.enterprise.inject.spi.BeanManager beanManager,
                                                             Class<A> annotationClass,
                                                             MonitorContext monitorContext)
        Gets the annotation from the method that triggered the interceptor.
        Type Parameters:
        A - The annotation type to return
        Parameters:
        beanManager - The invoking interceptor's BeanManager
        annotationClass - The class of the annotation to get
        monitorContext - The targeted jaxrs resource
        Returns:
        The annotation that triggered the interceptor.
      • getConfigOverrideValue

        public static <A extends Annotation,​T> Optional<T> getConfigOverrideValue​(Class<A> annotationClass,
                                                                                        String parameterName,
                                                                                        MonitorContext monitorContext,
                                                                                        Class<T> parameterType)
        Gets overriding config parameter values if they're present from an invocation context.
        Type Parameters:
        A - The annotation type
        Parameters:
        annotationClass - The annotation class
        parameterName - The name of the parameter to get the override value of
        monitorContext - The context of the invoking request
        parameterType - The type of the parameter to get the override value of
        Returns:
        An Optional containing the override value from the config if there is one