Class DnsClient

java.lang.Object
io.vertx.mutiny.core.dns.DnsClient
All Implemented Interfaces:
MutinyDelegate

public class DnsClient extends Object implements MutinyDelegate
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.

Author:
Norman Maurer
See Also:
  • DnsClient
  • Field Details

  • Constructor Details

    • DnsClient

      public DnsClient(io.vertx.core.dns.DnsClient delegate)
      Create a new instance of DnsClient delegating to the given (non-null) instance of DnsClient.
    • DnsClient

      public DnsClient(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.core.dns.DnsClient getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name to resolve
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.lookup(String)
    • lookupAndAwait

      public String lookupAndAwait(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 String. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.lookup(String)
    • lookupAndForget

      public DnsClient lookupAndForget(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 ignores the String result or any failure.

      Parameters:
      name - the name to resolve
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.lookup(String)
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name to resolve
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.lookup4(String)
    • lookup4AndAwait

      public String lookup4AndAwait(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 String. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.lookup4(String)
    • lookup4AndForget

      public DnsClient lookup4AndForget(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 ignores the String result or any failure.

      Parameters:
      name - the name to resolve
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.lookup4(String)
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name to resolve
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.lookup6(String)
    • lookup6AndAwait

      public String lookup6AndAwait(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 String. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.lookup6(String)
    • lookup6AndForget

      public DnsClient lookup6AndForget(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 ignores the String result or any failure.

      Parameters:
      name - the name to resolve
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.lookup6(String)
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name to resolve
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.resolveA(String)
    • resolveAAndAwait

      public List<String> resolveAAndAwait(String name)
      Try to resolve all A (ipv4) records for the given name.

      Unlike the bare Vert.x variant, this method returns a List<String>. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.resolveA(String)
    • resolveAAndForget

      public DnsClient resolveAAndForget(String name)
      Try to resolve all A (ipv4) records for the given name.

      Unlike the bare Vert.x variant, this method ignores the List<String> result or any failure.

      Parameters:
      name - the name to resolve
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.resolveA(String)
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name to resolve
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.resolveAAAA(String)
    • resolveAAAAAndAwait

      public List<String> resolveAAAAAndAwait(String name)
      Try to resolve all AAAA (ipv6) records for the given name.

      Unlike the bare Vert.x variant, this method returns a List<String>. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.resolveAAAA(String)
    • resolveAAAAAndForget

      public DnsClient resolveAAAAAndForget(String name)
      Try to resolve all AAAA (ipv6) records for the given name.

      Unlike the bare Vert.x variant, this method ignores the List<String> result or any failure.

      Parameters:
      name - the name to resolve
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.resolveAAAA(String)
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name to resolve the CNAME for
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.resolveCNAME(String)
    • resolveCNAMEAndAwait

      public List<String> resolveCNAMEAndAwait(String name)
      Try to resolve the CNAME record for the given name.

      Unlike the bare Vert.x variant, this method returns a List<String>. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.resolveCNAME(String)
    • resolveCNAMEAndForget

      public DnsClient resolveCNAMEAndForget(String name)
      Try to resolve the CNAME record for the given name.

      Unlike the bare Vert.x variant, this method ignores the List<String> result or any failure.

      Parameters:
      name - the name to resolve the CNAME for
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.resolveCNAME(String)
    • resolveMX

      @CheckReturnValue public io.smallrye.mutiny.Uni<List<io.vertx.core.dns.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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name for which the MX records should be resolved
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.resolveMX(String)
    • resolveMXAndAwait

      public List<io.vertx.core.dns.MxRecord> resolveMXAndAwait(String name)
      Try to resolve the MX records for the given name.

      Unlike the bare Vert.x variant, this method returns a List<io.vertx.core.dns.MxRecord>. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.resolveMX(String)
    • resolveMXAndForget

      public DnsClient resolveMXAndForget(String name)
      Try to resolve the MX records for the given name.

      Unlike the bare Vert.x variant, this method ignores the List<io.vertx.core.dns.MxRecord> result or any failure.

      Parameters:
      name - the name for which the MX records should be resolved
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.resolveMX(String)
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name for which the TXT records should be resolved
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.resolveTXT(String)
    • resolveTXTAndAwait

      public List<String> resolveTXTAndAwait(String name)
      Try to resolve the TXT records for the given name.

      Unlike the bare Vert.x variant, this method returns a List<String>. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.resolveTXT(String)
    • resolveTXTAndForget

      public DnsClient resolveTXTAndForget(String name)
      Try to resolve the TXT records for the given name.

      Unlike the bare Vert.x variant, this method ignores the List<String> result or any failure.

      Parameters:
      name - the name for which the TXT records should be resolved
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.resolveTXT(String)
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name to resolve the PTR for
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.resolvePTR(String)
    • resolvePTRAndAwait

      public String resolvePTRAndAwait(String name)
      Try to resolve the PTR record for the given name.

      Unlike the bare Vert.x variant, this method returns a String. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.resolvePTR(String)
    • resolvePTRAndForget

      public DnsClient resolvePTRAndForget(String name)
      Try to resolve the PTR record for the given name.

      Unlike the bare Vert.x variant, this method ignores the String result or any failure.

      Parameters:
      name - the name to resolve the PTR for
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.resolvePTR(String)
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name for which the NS records should be resolved
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.resolveNS(String)
    • resolveNSAndAwait

      public List<String> resolveNSAndAwait(String name)
      Try to resolve the NS records for the given name.

      Unlike the bare Vert.x variant, this method returns a List<String>. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.resolveNS(String)
    • resolveNSAndForget

      public DnsClient resolveNSAndForget(String name)
      Try to resolve the NS records for the given name.

      Unlike the bare Vert.x variant, this method ignores the List<String> result or any failure.

      Parameters:
      name - the name for which the NS records should be resolved
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.resolveNS(String)
    • resolveSRV

      @CheckReturnValue public io.smallrye.mutiny.Uni<List<io.vertx.core.dns.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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      name - the name for which the SRV records should be resolved
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.resolveSRV(String)
    • resolveSRVAndAwait

      public List<io.vertx.core.dns.SrvRecord> resolveSRVAndAwait(String name)
      Try to resolve the SRV records for the given name.

      Unlike the bare Vert.x variant, this method returns a List<io.vertx.core.dns.SrvRecord>. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.resolveSRV(String)
    • resolveSRVAndForget

      public DnsClient resolveSRVAndForget(String name)
      Try to resolve the SRV records for the given name.

      Unlike the bare Vert.x variant, this method ignores the List<io.vertx.core.dns.SrvRecord> result or any failure.

      Parameters:
      name - the name for which the SRV records should be resolved
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.resolveSRV(String)
    • 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. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      ipaddress - the IP address to resolve the PTR for
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.reverseLookup(String)
    • reverseLookupAndAwait

      public String reverseLookupAndAwait(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 String. This method awaits indefinitely 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 operation result
      See Also:
      • DnsClient.reverseLookup(String)
    • reverseLookupAndForget

      public DnsClient reverseLookupAndForget(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 ignores the String result or any failure.

      Parameters:
      ipaddress - the IP address to resolve the PTR for
      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.reverseLookup(String)
    • close

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

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • DnsClient.close()
    • closeAndAwait

      public void closeAndAwait()
      Close the client.

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely 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).

      See Also:
      • DnsClient.close()
    • closeAndForget

      public DnsClient closeAndForget()
      Close the client.

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • DnsClient.close()
    • newInstance

      public static DnsClient newInstance(io.vertx.core.dns.DnsClient delegate)
      Creates a new instance of the DnsClient.
    • hashCode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object