Class HttpCriterion
java.lang.Object
org.sentrysoftware.maven.metricshub.connector.producer.model.criteria.AbstractCriterion
org.sentrysoftware.maven.metricshub.connector.producer.model.criteria.HttpCriterion
Represents a criterion for filtering based on an HTTP request.
- See Also:
-
Constructor Summary
ConstructorDescriptionHttpCriterion
(com.fasterxml.jackson.databind.JsonNode criterion) Constructs HttpCriterion with the specified JSON criterion. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ICriterionVisitor visitor) Accepts the given visitor.getBody()
Gets the body from the criterion, ornull
if not present.Gets the header from the criterion, ornull
if not present.getMethodOrDefault
(String defaultValue) Gets the method from the criterion, or a default value if not present.getPath()
Gets the Path from the criterion, ornull
if not present.getResultContentOrDefault
(String defaultValue) Gets the result content from the criterion, or a default value if not present.getUrl()
Gets the URL from the criterion, ornull
if not present.
-
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
Description copied from class:AbstractCriterion
Accepts the given visitor.- Specified by:
accept
in classAbstractCriterion
- Parameters:
visitor
- The visitor class with its specific business logic.
-
getMethodOrDefault
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
Gets the URL from the criterion, ornull
if not present.- Returns:
- The URL from the criterion, or
null
if not present.
-
getPath
Gets the Path from the criterion, ornull
if not present.- Returns:
- The Path from the criterion, or
null
if not present.
-
getHeader
Gets the header from the criterion, ornull
if not present.- Returns:
- The header from the criterion, or
null
if not present.
-
getBody
Gets the body from the criterion, ornull
if not present.- Returns:
- The body from the criterion, or
null
if not present.
-
getResultContentOrDefault
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.
-