java.lang.Object
org.sentrysoftware.maven.metricshub.connector.producer.model.criteria.AbstractCriterion
org.sentrysoftware.maven.metricshub.connector.producer.model.criteria.HttpCriterion

public class HttpCriterion extends AbstractCriterion
Represents a criterion for filtering based on an HTTP request.
See Also:
  • Constructor Details

    • HttpCriterion

      public HttpCriterion(com.fasterxml.jackson.databind.JsonNode criterion)
      Constructs HttpCriterion with the specified JSON criterion.
      Parameters:
      criterion - The JSON criterion for HTTP.
  • Method Details

    • accept

      public void accept(ICriterionVisitor visitor)
      Description copied from class: AbstractCriterion
      Accepts the given visitor.
      Specified by:
      accept in class AbstractCriterion
      Parameters:
      visitor - The visitor class with its specific business logic.
    • getMethodOrDefault

      public String getMethodOrDefault(String defaultValue)
      Gets the method from the criterion, or a default value if not present.
      Parameters:
      defaultValue - The default value to return if the method is not present.
      Returns:
      The method from the criterion, or the default value if not present.
    • getUrl

      public String getUrl()
      Gets the URL from the criterion, or null if not present.
      Returns:
      The URL from the criterion, or null if not present.
    • getPath

      public String getPath()
      Gets the Path from the criterion, or null if not present.
      Returns:
      The Path from the criterion, or null if not present.
    • getHeader

      public String getHeader()
      Gets the header from the criterion, or null if not present.
      Returns:
      The header from the criterion, or null if not present.
    • getBody

      public String getBody()
      Gets the body from the criterion, or null if not present.
      Returns:
      The body from the criterion, or null if not present.
    • getResultContentOrDefault

      public String getResultContentOrDefault(String defaultValue)
      Gets the result content from the criterion, or a default value if not present.
      Parameters:
      defaultValue - The default value to return if the result content is not present.
      Returns:
      The result content from the criterion, or the default value if not present.