Class OnEndpointElementCondition

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

public abstract class OnEndpointElementCondition extends org.springframework.boot.autoconfigure.condition.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
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    OnEndpointElementCondition(String prefix, Class<? extends Annotation> annotationType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.boot.autoconfigure.condition.ConditionOutcome
    getDefaultOutcome(org.springframework.context.annotation.ConditionContext context, org.springframework.core.annotation.AnnotationAttributes annotationAttributes)
    Return the default outcome that should be used if property is not set.
    protected org.springframework.boot.autoconfigure.condition.ConditionOutcome
    getEndpointOutcome(org.springframework.context.annotation.ConditionContext context, String endpointName)
     
    org.springframework.boot.autoconfigure.condition.ConditionOutcome
    getMatchOutcome(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
     

    Methods inherited from class org.springframework.boot.autoconfigure.condition.SpringBootCondition

    anyMatches, logOutcome, matches, matches

    Methods inherited from class java.lang.Object

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

    • OnEndpointElementCondition

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

    • getMatchOutcome

      public org.springframework.boot.autoconfigure.condition.ConditionOutcome getMatchOutcome(org.springframework.context.annotation.ConditionContext context, org.springframework.core.type.AnnotatedTypeMetadata metadata)
      Specified by:
      getMatchOutcome in class org.springframework.boot.autoconfigure.condition.SpringBootCondition
    • getEndpointOutcome

      protected org.springframework.boot.autoconfigure.condition.ConditionOutcome getEndpointOutcome(org.springframework.context.annotation.ConditionContext context, String endpointName)
    • getDefaultOutcome

      protected org.springframework.boot.autoconfigure.condition.ConditionOutcome getDefaultOutcome(org.springframework.context.annotation.ConditionContext context, org.springframework.core.annotation.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