Class DnsClient


  • public class DnsClient
    extends Object
    Provides a way to asynchronously lookup information from DNS servers.

    Please consult the documentation for more information on DNS clients.

    The client is thread safe and can be used from any thread.

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • DnsClient

        public DnsClient​(io.vertx.core.dns.DnsClient delegate)
      • DnsClient

        public DnsClient​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.core.dns.DnsClient getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • lookup

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<String> lookup​(String name)
        Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name. The first found will be used.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name to resolve
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • lookupAndAwait

        public String lookupAndAwait​(String name)
        Blocking variant of lookup(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name to resolve
        Returns:
        the String instance produced by the operation.
      • lookupAndForget

        public DnsClient lookupAndForget​(String name)
        Variant of lookup(String) that ignores the result of the operation.

        This method subscribes on the result of lookup(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from lookup(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name to resolve
        Returns:
        the instance of DnsClient to chain method calls.
      • lookup4

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<String> lookup4​(String name)
        Try to lookup the A (ipv4) record for the given name. The first found will be used.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name to resolve
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • lookup4AndAwait

        public String lookup4AndAwait​(String name)
        Blocking variant of lookup4(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name to resolve
        Returns:
        the String instance produced by the operation.
      • lookup4AndForget

        public DnsClient lookup4AndForget​(String name)
        Variant of lookup4(String) that ignores the result of the operation.

        This method subscribes on the result of lookup4(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from lookup4(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name to resolve
        Returns:
        the instance of DnsClient to chain method calls.
      • lookup6

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<String> lookup6​(String name)
        Try to lookup the AAAA (ipv6) record for the given name. The first found will be used.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name to resolve
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • lookup6AndAwait

        public String lookup6AndAwait​(String name)
        Blocking variant of lookup6(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name to resolve
        Returns:
        the String instance produced by the operation.
      • lookup6AndForget

        public DnsClient lookup6AndForget​(String name)
        Variant of lookup6(String) that ignores the result of the operation.

        This method subscribes on the result of lookup6(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from lookup6(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name to resolve
        Returns:
        the instance of DnsClient to chain method calls.
      • resolveA

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<List<String>> resolveA​(String name)
        Try to resolve all A (ipv4) records for the given name.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name to resolve
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • resolveAAndAwait

        public List<String> resolveAAndAwait​(String name)
        Blocking variant of resolveA(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name to resolve
        Returns:
        the List instance produced by the operation.
      • resolveAAndForget

        public DnsClient resolveAAndForget​(String name)
        Variant of resolveA(String) that ignores the result of the operation.

        This method subscribes on the result of resolveA(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from resolveA(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name to resolve
        Returns:
        the instance of DnsClient to chain method calls.
      • resolveAAAA

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<List<String>> resolveAAAA​(String name)
        Try to resolve all AAAA (ipv6) records for the given name.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name to resolve
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • resolveAAAAAndAwait

        public List<String> resolveAAAAAndAwait​(String name)
        Blocking variant of resolveAAAA(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name to resolve
        Returns:
        the List instance produced by the operation.
      • resolveAAAAAndForget

        public DnsClient resolveAAAAAndForget​(String name)
        Variant of resolveAAAA(String) that ignores the result of the operation.

        This method subscribes on the result of resolveAAAA(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from resolveAAAA(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name to resolve
        Returns:
        the instance of DnsClient to chain method calls.
      • resolveCNAME

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<List<String>> resolveCNAME​(String name)
        Try to resolve the CNAME record for the given name.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name to resolve the CNAME for
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • resolveCNAMEAndAwait

        public List<String> resolveCNAMEAndAwait​(String name)
        Blocking variant of resolveCNAME(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name to resolve the CNAME for
        Returns:
        the List instance produced by the operation.
      • resolveCNAMEAndForget

        public DnsClient resolveCNAMEAndForget​(String name)
        Variant of resolveCNAME(String) that ignores the result of the operation.

        This method subscribes on the result of resolveCNAME(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from resolveCNAME(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name to resolve the CNAME for
        Returns:
        the instance of DnsClient to chain method calls.
      • resolveMX

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<List<MxRecord>> resolveMX​(String name)
        Try to resolve the MX records for the given name.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name for which the MX records should be resolved
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • resolveMXAndAwait

        public List<MxRecord> resolveMXAndAwait​(String name)
        Blocking variant of resolveMX(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name for which the MX records should be resolved
        Returns:
        the List instance produced by the operation.
      • resolveMXAndForget

        public DnsClient resolveMXAndForget​(String name)
        Variant of resolveMX(String) that ignores the result of the operation.

        This method subscribes on the result of resolveMX(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from resolveMX(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name for which the MX records should be resolved
        Returns:
        the instance of DnsClient to chain method calls.
      • resolveTXT

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<List<String>> resolveTXT​(String name)
        Try to resolve the TXT records for the given name.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name for which the TXT records should be resolved
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • resolveTXTAndAwait

        public List<String> resolveTXTAndAwait​(String name)
        Blocking variant of resolveTXT(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name for which the TXT records should be resolved
        Returns:
        the List instance produced by the operation.
      • resolveTXTAndForget

        public DnsClient resolveTXTAndForget​(String name)
        Variant of resolveTXT(String) that ignores the result of the operation.

        This method subscribes on the result of resolveTXT(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from resolveTXT(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name for which the TXT records should be resolved
        Returns:
        the instance of DnsClient to chain method calls.
      • resolvePTR

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<String> resolvePTR​(String name)
        Try to resolve the PTR record for the given name.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name to resolve the PTR for
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • resolvePTRAndAwait

        public String resolvePTRAndAwait​(String name)
        Blocking variant of resolvePTR(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name to resolve the PTR for
        Returns:
        the String instance produced by the operation.
      • resolvePTRAndForget

        public DnsClient resolvePTRAndForget​(String name)
        Variant of resolvePTR(String) that ignores the result of the operation.

        This method subscribes on the result of resolvePTR(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from resolvePTR(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name to resolve the PTR for
        Returns:
        the instance of DnsClient to chain method calls.
      • resolveNS

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<List<String>> resolveNS​(String name)
        Try to resolve the NS records for the given name.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name for which the NS records should be resolved
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • resolveNSAndAwait

        public List<String> resolveNSAndAwait​(String name)
        Blocking variant of resolveNS(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name for which the NS records should be resolved
        Returns:
        the List instance produced by the operation.
      • resolveNSAndForget

        public DnsClient resolveNSAndForget​(String name)
        Variant of resolveNS(String) that ignores the result of the operation.

        This method subscribes on the result of resolveNS(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from resolveNS(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name for which the NS records should be resolved
        Returns:
        the instance of DnsClient to chain method calls.
      • resolveSRV

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<List<SrvRecord>> resolveSRV​(String name)
        Try to resolve the SRV records for the given name.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        name - the name for which the SRV records should be resolved
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • resolveSRVAndAwait

        public List<SrvRecord> resolveSRVAndAwait​(String name)
        Blocking variant of resolveSRV(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        name - the name for which the SRV records should be resolved
        Returns:
        the List instance produced by the operation.
      • resolveSRVAndForget

        public DnsClient resolveSRVAndForget​(String name)
        Variant of resolveSRV(String) that ignores the result of the operation.

        This method subscribes on the result of resolveSRV(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from resolveSRV(String) but you don't need to compose it with other operations.

        Parameters:
        name - the name for which the SRV records should be resolved
        Returns:
        the instance of DnsClient to chain method calls.
      • reverseLookup

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<String> reverseLookup​(String ipaddress)
        Try to do a reverse lookup of an IP address. This is basically the same as doing trying to resolve a PTR record but allows you to just pass in the IP address and not a valid ptr query string.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Parameters:
        ipaddress - the IP address to resolve the PTR for
        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • reverseLookupAndAwait

        public String reverseLookupAndAwait​(String ipaddress)
        Blocking variant of reverseLookup(String).

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Parameters:
        ipaddress - the IP address to resolve the PTR for
        Returns:
        the String instance produced by the operation.
      • reverseLookupAndForget

        public DnsClient reverseLookupAndForget​(String ipaddress)
        Variant of reverseLookup(String) that ignores the result of the operation.

        This method subscribes on the result of reverseLookup(String), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from reverseLookup(String) but you don't need to compose it with other operations.

        Parameters:
        ipaddress - the IP address to resolve the PTR for
        Returns:
        the instance of DnsClient to chain method calls.
      • close

        @CheckReturnValue
        public io.smallrye.mutiny.Uni<Void> close()
        Close the client.

        Unlike the bare Vert.x variant, this method returns a Uni. Don't forget to subscribe on it to trigger the operation.

        Returns:
        the uni firing the result of the operation when completed, or a failure if the operation failed.
      • closeAndAwait

        public Void closeAndAwait()
        Blocking variant of close().

        This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

        Returns:
        the Void instance produced by the operation.
      • closeAndForget

        public void closeAndForget()
        Variant of close() that ignores the result of the operation.

        This method subscribes on the result of close(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation from close() but you don't need to compose it with other operations.

      • newInstance

        public static DnsClient newInstance​(io.vertx.core.dns.DnsClient arg)