Class NoHealthcheckService

java.lang.Object
edu.university.ecs.lab.detection.antipatterns.services.NoHealthcheckService

public class NoHealthcheckService extends Object
Service class to check the presence of health check configurations in a YAML file.
  • Constructor Details

    • NoHealthcheckService

      public NoHealthcheckService()
  • Method Details

    • checkHealthcheck

      public NoHealthcheck checkHealthcheck(MicroserviceSystem microserviceSystem)
      Checks if both circuit breaker and rate limiter health checks are enabled in the YAML configuration.
      Returns:
      NoHealthcheck object that contains true if both circuit breaker and rate limiter health checks are enabled, NoHealthcheck object that contains false otherwise.
    • containsHealthCheck

      private boolean containsHealthCheck(com.google.gson.JsonObject data)
      Checks if the given JSON object contains the necessary configurations for health checks. Specifically, it verifies if both circuit breaker and rate limiter health checks are enabled and if the health indicators are registered for both circuit breakers and rate limiters.
      Parameters:
      data - The JsonObject representing the configuration data to check.
      Returns:
      true if the necessary health check configurations are present and enabled, false otherwise.