Class OnEndpointElementCondition

java.lang.Object
org.springframework.boot.autoconfigure.condition.SpringBootCondition
org.springframework.boot.actuate.autoconfigure.OnEndpointElementCondition
All Implemented Interfaces:
Condition

public abstract class OnEndpointElementCondition extends SpringBootCondition
Base endpoint element condition. An element can be disabled globally through the defaults name or individually through the name of the element.
Since:
2.0.0
Author:
Stephane Nicoll, Madhura Bhave
  • Constructor Details

    • OnEndpointElementCondition

      protected OnEndpointElementCondition(String prefix, Class<? extends Annotation> annotationType)
  • Method Details

    • getMatchOutcome

      public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata)
      Description copied from class: SpringBootCondition
      Determine the outcome of the match along with suitable log output.
      Specified by:
      getMatchOutcome in class SpringBootCondition
      Parameters:
      context - the condition context
      metadata - the annotation metadata
      Returns:
      the condition outcome
    • getEndpointOutcome

      protected ConditionOutcome getEndpointOutcome(ConditionContext context, String endpointName)
    • getDefaultOutcome

      protected ConditionOutcome getDefaultOutcome(ConditionContext context, AnnotationAttributes annotationAttributes)
      Return the default outcome that should be used if property is not set. By default this method will use the <prefix>.defaults.enabled property, matching if it is true or if it is not configured.
      Parameters:
      context - the condition context
      annotationAttributes - the annotation attributes
      Returns:
      the default outcome
      Since:
      2.6.0