Interface DiscoveryIssueReporter
-
@API(status=MAINTAINED, since="1.13.3") public interface DiscoveryIssueReporterDiscoveryIssueReporterdefines the API for reportingDiscoveryIssues.This interface is not intended to be implemented by clients.
- Since:
- 1.13
- See Also:
SelectorResolver.Context
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceDiscoveryIssueReporter.Condition<T>AConditionis a union ofPredicateandConsumer.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static DiscoveryIssueReportercollecting(java.util.Collection<? super DiscoveryIssue> collection)Create a newDiscoveryIssueReporterthat adds reported issues to the supplied collection.static DiscoveryIssueReporterconsuming(java.util.function.Consumer<? super DiscoveryIssue> consumer)Create a newDiscoveryIssueReporterthat adds reported issues to the supplied consumer.default <T> DiscoveryIssueReporter.Condition<T>createReportingCondition(java.util.function.Predicate<T> predicate, java.util.function.Function<T,DiscoveryIssue> issueCreator)Create aDiscoveryIssueReporter.Conditionthat reports aDiscoveryIssuewhen the suppliedPredicateis not met.static DiscoveryIssueReporterdeduplicating(DiscoveryIssueReporter delegate)Create a newDiscoveryIssueReporterthat avoids reporting duplicate issues.static DiscoveryIssueReporterforwarding(EngineDiscoveryListener engineDiscoveryListener, UniqueId engineId)Create a newDiscoveryIssueReporterthat reports issues to the suppliedEngineDiscoveryListenerfor the specified engine.voidreportIssue(DiscoveryIssue issue)Report the suppliedDiscoveryIssue.default voidreportIssue(DiscoveryIssue.Builder builder)Build the suppliedBuilderand report the resultingDiscoveryIssue.
-
-
-
Method Detail
-
forwarding
static DiscoveryIssueReporter forwarding(EngineDiscoveryListener engineDiscoveryListener, UniqueId engineId)
Create a newDiscoveryIssueReporterthat reports issues to the suppliedEngineDiscoveryListenerfor the specified engine.- Parameters:
engineDiscoveryListener- the listener to report issues to; nevernullengineId- the unique identifier of the engine; nevernull
-
collecting
static DiscoveryIssueReporter collecting(java.util.Collection<? super DiscoveryIssue> collection)
Create a newDiscoveryIssueReporterthat adds reported issues to the supplied collection.- Parameters:
collection- the collection to add issues to; nevernull
-
consuming
static DiscoveryIssueReporter consuming(java.util.function.Consumer<? super DiscoveryIssue> consumer)
Create a newDiscoveryIssueReporterthat adds reported issues to the supplied consumer.- Parameters:
consumer- the consumer to report issues to; nevernull
-
deduplicating
static DiscoveryIssueReporter deduplicating(DiscoveryIssueReporter delegate)
Create a newDiscoveryIssueReporterthat avoids reporting duplicate issues.The implementation returned by this method is not thread-safe.
- Parameters:
delegate- the delegate to forward issues to; nevernull
-
reportIssue
default void reportIssue(DiscoveryIssue.Builder builder)
Build the suppliedBuilderand report the resultingDiscoveryIssue.
-
reportIssue
void reportIssue(DiscoveryIssue issue)
Report the suppliedDiscoveryIssue.
-
createReportingCondition
default <T> DiscoveryIssueReporter.Condition<T> createReportingCondition(java.util.function.Predicate<T> predicate, java.util.function.Function<T,DiscoveryIssue> issueCreator)
Create aDiscoveryIssueReporter.Conditionthat reports aDiscoveryIssuewhen the suppliedPredicateis not met.- Parameters:
predicate- the predicate to test; nevernullissueCreator- the function to create the issue with; nevernull- Returns:
- a new
Condition; nevernull
-
-