Class HealthStatusReport
- java.lang.Object
-
- jetbrains.buildServer.serverSide.healthStatus.HealthStatusReport
-
- All Implemented Interfaces:
ServerExtension
,TeamCityExtension
- Direct Known Subclasses:
BuildTypeSuggestion
,ProjectSuggestion
public abstract class HealthStatusReport extends java.lang.Object implements ServerExtension
Implementations of this class will find and report different issues in server configuration or state. Use HealthStatusItemPageExtension class to present results in the web.- Since:
- 8.0
-
-
Constructor Summary
Constructors Constructor Description HealthStatusReport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
canReportItemsFor(HealthStatusScope scope)
Check whether the report can produce any items accepted by the specified scope.boolean
equals(java.lang.Object obj)
abstract java.util.Collection<ItemCategory>
getCategories()
Problems categories producing by this problem finder.abstract java.lang.String
getDisplayName()
User presentable name of the problem finder.abstract java.lang.String
getType()
int
hashCode()
abstract void
report(HealthStatusScope scope, HealthStatusItemConsumer resultConsumer)
When called must report all found problems to result consumer according to the received scope.
-
-
-
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.
-
canReportItemsFor
public abstract boolean canReportItemsFor(@NotNull HealthStatusScope scope)
Check whether the report can produce any items accepted by the specified scope.report(HealthStatusScope, HealthStatusItemConsumer)
will not be called if this method return false. Implementations should not perform any complex calculations, they are expected to quickly analyzeHealthStatusScope
and return false if it is clear that they can not report any acceptable items. For example, they can return false if they can't produce items with the requested severity (that is accepted byHealthStatusScope.isItemWithSeverityAccepted(ItemSeverity)
).- Since:
- 9.0
-
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 fromcanReportItemsFor(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 coderesultConsumer
- health status item consumer
-
equals
public final boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public final int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-