Class HealthStatusReport

    • Constructor Detail

      • HealthStatusReport

        public HealthStatusReport()
    • Method Detail

      • getType

        @NotNull
        public abstract java.lang.String getType()
        Returns:
        unique identifier of the problem finder
      • getDisplayName

        @NotNull
        public abstract java.lang.String getDisplayName()
        User presentable name of the problem finder.
        Returns:
        name of the problem finder to show in the user interface.
      • getCategories

        @NotNull
        public abstract java.util.Collection<ItemCategory> getCategories()
        Problems categories producing by this problem finder. All problems of 'undeclared' categories will be filtered even if they were consumed.
        Returns:
        Unmodifiable not-empty collection of unique categories producing by this problem finder.
      • report

        public abstract void report​(@NotNull
                                    HealthStatusScope scope,
                                    @NotNull
                                    HealthStatusItemConsumer resultConsumer)
        When called must report all found problems to result consumer according to the received scope. Always called with system privileges (in all permissions mode) so no permission checks are required.

        Note that this method can be called quite often, so long-running implementations should return false from canReportItemsFor(HealthStatusScope) if it's clear that they can't produce any items for the requested scope.

        Implementations of this method should always return in a reasonable time. For example, long running computations or network calls should not be made in this method, but rather called in some background thread, their result saved to a cache, and then be read from the cache in this method.

        Parameters:
        scope - health status code
        resultConsumer - health status item consumer
      • equals

        public final boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object