Class AbstractHealthCheck

java.lang.Object
org.craftercms.engine.service.health.AbstractHealthCheck
All Implemented Interfaces:
HealthCheck
Direct Known Subclasses:
ScriptSiteHealthCheck, SiteContextHealthCheck

public abstract class AbstractHealthCheck extends Object implements HealthCheck
Basic implementation of HealthCheck with logging.
  • Field Details

    • logger

      protected final org.slf4j.Logger logger
    • contextManager

      protected final SiteContextManager contextManager
  • Constructor Details

  • Method Details

    • checkHealth

      public boolean checkHealth(String site)
      Description copied from interface: HealthCheck
      Performs a site health check.
      Specified by:
      checkHealth in interface HealthCheck
      Parameters:
      site - the site to check.
      Returns:
      true if the given site passes the check, false otherwise.
    • doCheckHealth

      protected abstract boolean doCheckHealth(String site)
      Performs the actual health check.
      Parameters:
      site - the site to check.
      Returns:
      true if the site is healthy, false otherwise.