Interface DiscoveryIssueReporter


  • @API(status=MAINTAINED,
         since="1.13.3")
    public interface DiscoveryIssueReporter
    DiscoveryIssueReporter defines the API for reporting DiscoveryIssues.

    This interface is not intended to be implemented by clients.

    Since:
    1.13
    See Also:
    SelectorResolver.Context
    • Method Detail

      • forwarding

        static DiscoveryIssueReporter forwarding​(EngineDiscoveryListener engineDiscoveryListener,
                                                 UniqueId engineId)
        Create a new DiscoveryIssueReporter that reports issues to the supplied EngineDiscoveryListener for the specified engine.
        Parameters:
        engineDiscoveryListener - the listener to report issues to; never null
        engineId - the unique identifier of the engine; never null
      • collecting

        static DiscoveryIssueReporter collecting​(java.util.Collection<? super DiscoveryIssue> collection)
        Create a new DiscoveryIssueReporter that adds reported issues to the supplied collection.
        Parameters:
        collection - the collection to add issues to; never null
      • consuming

        static DiscoveryIssueReporter consuming​(java.util.function.Consumer<? super DiscoveryIssue> consumer)
        Create a new DiscoveryIssueReporter that adds reported issues to the supplied consumer.
        Parameters:
        consumer - the consumer to report issues to; never null
      • deduplicating

        static DiscoveryIssueReporter deduplicating​(DiscoveryIssueReporter delegate)
        Create a new DiscoveryIssueReporter that avoids reporting duplicate issues.

        The implementation returned by this method is not thread-safe.

        Parameters:
        delegate - the delegate to forward issues to; never null
      • createReportingCondition

        default <T> DiscoveryIssueReporter.Condition<T> createReportingCondition​(java.util.function.Predicate<T> predicate,
                                                                                 java.util.function.Function<T,​DiscoveryIssue> issueCreator)
        Create a DiscoveryIssueReporter.Condition that reports a DiscoveryIssue when the supplied Predicate is not met.
        Parameters:
        predicate - the predicate to test; never null
        issueCreator - the function to create the issue with; never null
        Returns:
        a new Condition; never null