Interface ComponentMonitor


public interface ComponentMonitor
Monitor that can be used to raise alerts when an issue is detected
  • Method Details

    • alert

      void alert(@Nonnull AlertRequest request)
      Raises a new alert for the component.
      Parameters:
      request - alert details, including the identified Issue
    • defineIssue

      @Nonnull IssueBuilder defineIssue(int issueId)
      Defines a new issue for the component, which be used when raising alerts.
      Parameters:
      issueId - the numeric issue ID, which must be in the 1-9999 range
      Returns:
      a builder for the issue
    • getComponent

      @Nonnull Component getComponent()
      Returns:
      the component for which this is a monitor
    • getIssue

      @Nonnull Optional<Issue> getIssue(int issueId)
      Parameters:
      issueId - the component-specific ID of the issue to retrieve
      Returns:
      the issue, if defined for this monitor, otherwise Optional.empty()
    • getIssues

      @Nonnull List<Issue> getIssues()
      Returns:
      the issues configured for this monitor
    • isEnabled

      boolean isEnabled()
      Returns:
      true if the monitoring feature is enabled, otherwise false