Interface HealthMonitorable

All Known Subinterfaces:
HealthMonitor

public interface HealthMonitorable
Any component that can be monitored for health should implement this interface.
  • Method Details

    • getName

      default String getName()
      Used by a HealthMonitor to get the name of this component. Most `HealthMonitorable`s override this method to return their actor name. If they don't override the method, the name of the class is returned.
      Returns:
      the name of this component
    • getHealthReport

      HealthReport getHealthReport()
      Used by a HealthMonitor to get the health status of this component, typically invoked periodically.
      Returns:
      health status
    • addFailureListener

      void addFailureListener(FailureListener failureListener)
      Register a failure observer.
      Parameters:
      failureListener - failure observer to be invoked when a failure that affects the health status of this component occurs
    • removeFailureListener

      void removeFailureListener(FailureListener failureListener)
      Removes a previously registered listener. Should do nothing if it was not previously registered.
      Parameters:
      failureListener - the failure listener to remove