Class: Vertx::DnsClient
- Inherits:
-
Object
- Object
- Vertx::DnsClient
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb
Overview
Provides a way to asynchronously lookup information from DNS servers.
Please consult the documentation for more information on DNS clients.
Instance Method Summary (collapse)
-
- (self) lookup(name = nil)
Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name.
-
- (self) lookup4(name = nil)
Try to lookup the A (ipv4) record for the given name.
-
- (self) lookup6(name = nil)
Try to lookup the AAAA (ipv6) record for the given name.
-
- (self) resolve_a(name = nil)
Try to resolve all A (ipv4) records for the given name.
-
- (self) resolve_aaaa(name = nil)
Try to resolve all AAAA (ipv6) records for the given name.
-
- (self) resolve_cname(name = nil)
Try to resolve the CNAME record for the given name.
-
- (self) resolve_mx(name = nil)
Try to resolve the MX records for the given name.
-
- (self) resolve_ns(name = nil)
Try to resolve the NS records for the given name.
-
- (self) resolve_ptr(name = nil)
Try to resolve the PTR record for the given name.
-
- (self) resolve_srv(name = nil)
Try to resolve the SRV records for the given name.
-
- (self) resolve_txt(name = nil)
Try to resolve the TXT records for the given name.
-
- (self) reverse_lookup(ipaddress = nil)
Try to do a reverse lookup of an IP address.
Instance Method Details
- (self) lookup(name = nil)
Try to lookup the A (ipv4) or AAAA (ipv6) record for the given name. The first found will be used.
24 25 26 27 28 29 30 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 24 def lookup(name=nil) if name.class == String && block_given? @j_del.java_method(:lookup, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling lookup(name)" end |
- (self) lookup4(name = nil)
Try to lookup the A (ipv4) record for the given name. The first found will be used.
35 36 37 38 39 40 41 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 35 def lookup4(name=nil) if name.class == String && block_given? @j_del.java_method(:lookup4, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling lookup4(name)" end |
- (self) lookup6(name = nil)
Try to lookup the AAAA (ipv6) record for the given name. The first found will be used.
46 47 48 49 50 51 52 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 46 def lookup6(name=nil) if name.class == String && block_given? @j_del.java_method(:lookup6, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling lookup6(name)" end |
- (self) resolve_a(name = nil)
Try to resolve all A (ipv4) records for the given name.
57 58 59 60 61 62 63 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 57 def resolve_a(name=nil) if name.class == String && block_given? @j_del.java_method(:resolveA, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling resolve_a(name)" end |
- (self) resolve_aaaa(name = nil)
Try to resolve all AAAA (ipv6) records for the given name.
68 69 70 71 72 73 74 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 68 def resolve_aaaa(name=nil) if name.class == String && block_given? @j_del.java_method(:resolveAAAA, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling resolve_aaaa(name)" end |
- (self) resolve_cname(name = nil)
Try to resolve the CNAME record for the given name.
79 80 81 82 83 84 85 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 79 def resolve_cname(name=nil) if name.class == String && block_given? @j_del.java_method(:resolveCNAME, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling resolve_cname(name)" end |
- (self) resolve_mx(name = nil)
Try to resolve the MX records for the given name.
90 91 92 93 94 95 96 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 90 def resolve_mx(name=nil) if name.class == String && block_given? @j_del.java_method(:resolveMX, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| ::Vertx::MxRecord.new(elt) } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling resolve_mx(name)" end |
- (self) resolve_ns(name = nil)
Try to resolve the NS records for the given name.
123 124 125 126 127 128 129 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 123 def resolve_ns(name=nil) if name.class == String && block_given? @j_del.java_method(:resolveNS, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling resolve_ns(name)" end |
- (self) resolve_ptr(name = nil)
Try to resolve the PTR record for the given name.
112 113 114 115 116 117 118 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 112 def resolve_ptr(name=nil) if name.class == String && block_given? @j_del.java_method(:resolvePTR, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling resolve_ptr(name)" end |
- (self) resolve_srv(name = nil)
Try to resolve the SRV records for the given name.
134 135 136 137 138 139 140 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 134 def resolve_srv(name=nil) if name.class == String && block_given? @j_del.java_method(:resolveSRV, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| ::Vertx::SrvRecord.new(elt) } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling resolve_srv(name)" end |
- (self) resolve_txt(name = nil)
Try to resolve the TXT records for the given name.
101 102 103 104 105 106 107 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 101 def resolve_txt(name=nil) if name.class == String && block_given? @j_del.java_method(:resolveTXT, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(name,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result.to_a.map { |elt| elt } : nil) })) return self end raise ArgumentError, "Invalid arguments when calling resolve_txt(name)" end |
- (self) reverse_lookup(ipaddress = nil)
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.
146 147 148 149 150 151 152 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/src/main/resources/vertx/dns_client.rb', line 146 def reverse_lookup(ipaddress=nil) if ipaddress.class == String && block_given? @j_del.java_method(:reverseLookup, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(ipaddress,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) })) return self end raise ArgumentError, "Invalid arguments when calling reverse_lookup(ipaddress)" end |