@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort()); options.getAddressResolverOptions().setOptResourceEnabled(false); return options; }
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort()); options.getAddressResolverOptions().setOptResourceEnabled(false); return options; }
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().setHostsValue(Buffer.buffer("" + "127.0.0.1 localhost\n" + "127.0.0.1 host1\n" + "127.0.0.1 host2.com\n" + "127.0.0.1 example.com")); return options; }
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().setHostsValue(Buffer.buffer("" + "127.0.0.1 localhost\n" + "127.0.0.1 host2.com")); return options; }
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().setHostsValue(Buffer.buffer("" + "127.0.0.1 localhost\n" + "127.0.0.1 host0\n" + "127.0.0.1 host1\n" + "127.0.0.1 host2\n")); return options; }
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().setHostsValue(Buffer.buffer("" + "127.0.0.1 localhost\n" + "127.0.0.1 host1\n" + "127.0.0.1 host2.com\n" + "127.0.0.1 sub.host3.com\n" + "127.0.0.1 host4.com\n" + "127.0.0.1 www.host4.com\n" + "127.0.0.1 host5.com\n" + "127.0.0.1 www.host5.com\n" + "127.0.0.1 unknown.com")); return options; }
static void toJson(VertxOptions obj, java.util.Map<String, Object> json) { if (obj.getAddressResolverOptions() != null) { json.put("addressResolverOptions", obj.getAddressResolverOptions().toJson());
private void testDefaultDnsClient(Function<Vertx, DnsClient> clientProvider) throws Exception { final String ip = "10.0.0.1"; dnsServer.testLookup4(ip); VertxOptions vertxOptions = new VertxOptions(); InetSocketAddress fakeServerAddress = dnsServer.localAddress(); vertxOptions.getAddressResolverOptions().addServer(fakeServerAddress.getHostString() + ":" + fakeServerAddress.getPort()); Vertx vertxWithFakeDns = Vertx.vertx(vertxOptions); DnsClient dnsClient = clientProvider.apply(vertxWithFakeDns); dnsClient.lookup4("vertx.io", onSuccess(result -> { assertEquals(ip, result); testComplete(); })); await(); vertxWithFakeDns.close(); }
this.addressResolverOptions = options.getAddressResolverOptions(); this.addressResolver = new AddressResolver(this, options.getAddressResolverOptions()); this.deploymentManager = new DeploymentManager(this); if (options.isClustered()) {
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort()); options.getAddressResolverOptions().setOptResourceEnabled(false); return options; }
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort()); options.getAddressResolverOptions().setOptResourceEnabled(false); return options; }
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().setHostsValue(Buffer.buffer("" + "127.0.0.1 localhost\n" + "127.0.0.1 host1\n" + "127.0.0.1 host2.com\n" + "127.0.0.1 example.com")); return options; }
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().setHostsValue(Buffer.buffer("" + "127.0.0.1 localhost\n" + "127.0.0.1 host0\n" + "127.0.0.1 host1\n" + "127.0.0.1 host2\n")); return options; }
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().setHostsValue(Buffer.buffer("" + "127.0.0.1 localhost\n" + "127.0.0.1 host2.com")); return options; }
@Override protected VertxOptions getOptions() { VertxOptions options = super.getOptions(); options.getAddressResolverOptions().setHostsValue(Buffer.buffer("" + "127.0.0.1 localhost\n" + "127.0.0.1 host1\n" + "127.0.0.1 host2.com\n" + "127.0.0.1 sub.host3.com\n" + "127.0.0.1 host4.com\n" + "127.0.0.1 www.host4.com\n" + "127.0.0.1 host5.com\n" + "127.0.0.1 www.host5.com\n" + "127.0.0.1 unknown.com")); return options; }
static void toJson(VertxOptions obj, java.util.Map<String, Object> json) { if (obj.getAddressResolverOptions() != null) { json.put("addressResolverOptions", obj.getAddressResolverOptions().toJson());
private void testDefaultDnsClient(Function<Vertx, DnsClient> clientProvider) throws Exception { final String ip = "10.0.0.1"; dnsServer.testLookup4(ip); VertxOptions vertxOptions = new VertxOptions(); InetSocketAddress fakeServerAddress = dnsServer.localAddress(); vertxOptions.getAddressResolverOptions().addServer(fakeServerAddress.getHostString() + ":" + fakeServerAddress.getPort()); Vertx vertxWithFakeDns = Vertx.vertx(vertxOptions); DnsClient dnsClient = clientProvider.apply(vertxWithFakeDns); dnsClient.lookup4("vertx.io", onSuccess(result -> { assertEquals(ip, result); testComplete(); })); await(); vertxWithFakeDns.close(); }
this.addressResolverOptions = options.getAddressResolverOptions(); this.addressResolver = new AddressResolver(this, options.getAddressResolverOptions()); this.deploymentManager = new DeploymentManager(this); if (options.isClustered()) {