Interface DiscoveryIssueReporter
DiscoveryIssueReporter
defines the API for reporting
DiscoveryIssues
.
This interface is not intended to be implemented by clients.
- Since:
- 1.13
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscoveryIssueReporter
collecting
(Collection<? super DiscoveryIssue> collection) Create a newDiscoveryIssueReporter
that adds reported issues to the supplied collection.static DiscoveryIssueReporter
consuming
(Consumer<? super DiscoveryIssue> consumer) Create a newDiscoveryIssueReporter
that adds reported issues to the supplied consumer.default <T> DiscoveryIssueReporter.Condition
<T> createReportingCondition
(Predicate<T> predicate, Function<T, DiscoveryIssue> issueCreator) Create aDiscoveryIssueReporter.Condition
that reports aDiscoveryIssue
when the suppliedPredicate
is not met.static DiscoveryIssueReporter
deduplicating
(DiscoveryIssueReporter delegate) Create a newDiscoveryIssueReporter
that avoids reporting duplicate issues.static DiscoveryIssueReporter
forwarding
(EngineDiscoveryListener engineDiscoveryListener, UniqueId engineId) Create a newDiscoveryIssueReporter
that reports issues to the suppliedEngineDiscoveryListener
for the specified engine.void
reportIssue
(DiscoveryIssue issue) Report the suppliedDiscoveryIssue
.default void
reportIssue
(DiscoveryIssue.Builder builder) Build the suppliedBuilder
and report the resultingDiscoveryIssue
.
-
Method Details
-
forwarding
static DiscoveryIssueReporter forwarding(EngineDiscoveryListener engineDiscoveryListener, UniqueId engineId) Create a newDiscoveryIssueReporter
that reports issues to the suppliedEngineDiscoveryListener
for the specified engine.- Parameters:
engineDiscoveryListener
- the listener to report issues to; nevernull
engineId
- the unique identifier of the engine; nevernull
-
collecting
Create a newDiscoveryIssueReporter
that adds reported issues to the supplied collection.- Parameters:
collection
- the collection to add issues to; nevernull
-
consuming
Create a newDiscoveryIssueReporter
that adds reported issues to the supplied consumer.- Parameters:
consumer
- the consumer to report issues to; nevernull
-
deduplicating
Create a newDiscoveryIssueReporter
that avoids reporting duplicate issues.The implementation returned by this method is not thread-safe.
- Parameters:
delegate
- the delegate to forward issues to; nevernull
-
reportIssue
Build the suppliedBuilder
and report the resultingDiscoveryIssue
. -
reportIssue
Report the suppliedDiscoveryIssue
. -
createReportingCondition
default <T> DiscoveryIssueReporter.Condition<T> createReportingCondition(Predicate<T> predicate, Function<T, DiscoveryIssue> issueCreator) Create aDiscoveryIssueReporter.Condition
that reports aDiscoveryIssue
when the suppliedPredicate
is not met.- Parameters:
predicate
- the predicate to test; nevernull
issueCreator
- the function to create the issue with; nevernull
- Returns:
- a new
Condition
; nevernull
-