Interface MetricAnnotationDiscovery

All Known Subinterfaces:
MetricAnnotationDiscovery.OfConstructor, MetricAnnotationDiscovery.OfMethod

public interface MetricAnnotationDiscovery
Conveys information about the discovery of a metric annotation as it applies to an executable.

The discovery event describes the executable to which the metric annotation applies. This is not necessarily where the annotation appears, because a metric annotation which appears on the type applies to all methods and constructors on that type. In that case, the discovery event describes the discovery of the metric as applied to the method or constructor, not to the type itself. Further, a metric annotation declared at the type level triggers a separate discovery event for each constructor and method on the type.

  • Method Details

    • annotatedTypeConfigurator

      AnnotatedTypeConfigurator<?> annotatedTypeConfigurator()
      Returns the configurator for the annotated type containing the site to which the metric annotation applies.
      Returns:
      the configurator for the annotated type
    • annotation

      Annotation annotation()
      Returns the Annotation object for the metric annotation discovered.
      Returns:
      the annotation object for the metrics annotation
    • deactivate

      void deactivate()
      Requests that the discovery be deactivated, thereby preventing it from triggering a metric registration.
    • disableDefaultInterceptor

      void disableDefaultInterceptor()
      Requests that the default metrics interceptor not be used for the metric corresponding to the indicated annotation which appears on this method.
    • isActive

      boolean isActive()
      Returns:
      if the discovery is active (i.e., has not been deactivated)