Class: Vertx::DnsClient
- Inherits:
-
Object
- Object
- Vertx::DnsClient
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/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.
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
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.
Class Method Details
+ (Boolean) accept?(obj)
21 22 23 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 21 def @@j_api_type.accept?(obj) obj.class == DnsClient end |
+ (Object) j_api_type
30 31 32 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 30 def self.j_api_type @@j_api_type end |
+ (Object) j_class
33 34 35 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 33 def self.j_class Java::IoVertxCoreDns::DnsClient.java_class end |
+ (Object) unwrap(obj)
27 28 29 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 27 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
24 25 26 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 24 def @@j_api_type.wrap(obj) DnsClient.new(obj) end |
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.
40 41 42 43 44 45 46 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 40 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.
51 52 53 54 55 56 57 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 51 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.
62 63 64 65 66 67 68 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 62 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.
73 74 75 76 77 78 79 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 73 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.
84 85 86 87 88 89 90 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 84 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.
95 96 97 98 99 100 101 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 95 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.
106 107 108 109 110 111 112 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 106 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::Util::Utils.safe_create(elt,::Vertx::MxRecord) } : 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.
139 140 141 142 143 144 145 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 139 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.
128 129 130 131 132 133 134 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 128 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.
150 151 152 153 154 155 156 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 150 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::Util::Utils.safe_create(elt,::Vertx::SrvRecord) } : 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.
117 118 119 120 121 122 123 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 117 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.
162 163 164 165 166 167 168 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx/dns_client.rb', line 162 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 |