Class HttpCriterion
java.lang.Object
org.metricshub.maven.plugin.connector.producer.model.criteria.AbstractCriterion
org.metricshub.maven.plugin.connector.producer.model.criteria.HttpCriterion
Represents a criterion for filtering based on an HTTP request.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionHttpCriterion(com.fasterxml.jackson.databind.JsonNode criterion) Constructs HttpCriterion with the specified JSON criterion. -
Method Summary
Modifier and TypeMethodDescriptiongetBody()Gets the body from the criterion, ornullif not present.Gets the header from the criterion, ornullif 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, ornullif 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, ornullif not present.voidproduce(org.apache.maven.doxia.sink.Sink sink) Produces the HTTP criterion as a list item.
-
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
-
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, ornullif not present.- Returns:
- The URL from the criterion, or
nullif not present.
-
getPath
Gets the Path from the criterion, ornullif not present.- Returns:
- The Path from the criterion, or
nullif not present.
-
getHeader
Gets the header from the criterion, ornullif not present.- Returns:
- The header from the criterion, or
nullif not present.
-
getBody
Gets the body from the criterion, ornullif not present.- Returns:
- The body from the criterion, or
nullif 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.
-
produce
public void produce(org.apache.maven.doxia.sink.Sink sink) Produces the HTTP criterion as a list item.- Specified by:
producein classAbstractCriterion- Parameters:
sink- The sink to write to.
-