Interface DnsServiceDiscovererObserver.DnsDiscoveryObserver
- Enclosing interface:
- DnsServiceDiscovererObserver
public static interface DnsServiceDiscovererObserver.DnsDiscoveryObserver
An observer that provides visibility into individual DNS discoveries.
The discovery is considered complete when one of the terminal events is invoked. It's guaranteed only one terminal event will be invoked per request.
In case of an SRV lookup, there might be multiple DNS resolutions
observed for one
discovery.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
Notifies that the current DNS discovery got cancelled.default void
discoveryFailed
(Throwable cause) Notifies that the current DNS discovery failed.onNewResolution
(String name) Notifies that a new DNS resolution started.
-
Method Details
-
onNewResolution
Notifies that a new DNS resolution started.- Parameters:
name
- the name for the DNS question to be queried- Returns:
DnsServiceDiscovererObserver.DnsResolutionObserver
that provides visibility into results of the current DNS resolution
-
discoveryCancelled
default void discoveryCancelled()Notifies that the current DNS discovery got cancelled.This is one of the possible terminal events.
-
discoveryFailed
Notifies that the current DNS discovery failed.This is one of the possible terminal events.
- Parameters:
cause
-Throwable
as a cause for the failure
-