本文整理了Java中io.vertx.core.VertxOptions.getAddressResolverOptions()
方法的一些代码示例,展示了VertxOptions.getAddressResolverOptions()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VertxOptions.getAddressResolverOptions()
方法的具体详情如下:
包路径:io.vertx.core.VertxOptions
类名称:VertxOptions
方法名:getAddressResolverOptions
暂无
代码示例来源:origin: eclipse-vertx/vert.x
@Override
protected VertxOptions getOptions() {
VertxOptions options = super.getOptions();
options.getAddressResolverOptions().addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort());
options.getAddressResolverOptions().setOptResourceEnabled(false);
return options;
}
代码示例来源:origin: eclipse-vertx/vert.x
@Override
protected VertxOptions getOptions() {
VertxOptions options = super.getOptions();
options.getAddressResolverOptions().addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort());
options.getAddressResolverOptions().setOptResourceEnabled(false);
return options;
}
代码示例来源:origin: eclipse-vertx/vert.x
@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;
}
代码示例来源:origin: eclipse-vertx/vert.x
@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;
}
代码示例来源:origin: eclipse-vertx/vert.x
@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;
}
代码示例来源:origin: eclipse-vertx/vert.x
@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;
}
代码示例来源:origin: eclipse-vertx/vert.x
static void toJson(VertxOptions obj, java.util.Map<String, Object> json) {
if (obj.getAddressResolverOptions() != null) {
json.put("addressResolverOptions", obj.getAddressResolverOptions().toJson());
代码示例来源:origin: eclipse-vertx/vert.x
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();
}
代码示例来源:origin: eclipse-vertx/vert.x
this.addressResolverOptions = options.getAddressResolverOptions();
this.addressResolver = new AddressResolver(this, options.getAddressResolverOptions());
this.deploymentManager = new DeploymentManager(this);
if (options.isClustered()) {
代码示例来源:origin: io.vertx/vertx-core
@Override
protected VertxOptions getOptions() {
VertxOptions options = super.getOptions();
options.getAddressResolverOptions().addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort());
options.getAddressResolverOptions().setOptResourceEnabled(false);
return options;
}
代码示例来源:origin: io.vertx/vertx-core
@Override
protected VertxOptions getOptions() {
VertxOptions options = super.getOptions();
options.getAddressResolverOptions().addServer(dnsServerAddress.getAddress().getHostAddress() + ":" + dnsServerAddress.getPort());
options.getAddressResolverOptions().setOptResourceEnabled(false);
return options;
}
代码示例来源:origin: io.vertx/vertx-core
@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;
}
代码示例来源:origin: io.vertx/vertx-core
@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;
}
代码示例来源:origin: io.vertx/vertx-core
@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;
}
代码示例来源:origin: io.vertx/vertx-core
@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;
}
代码示例来源:origin: io.vertx/vertx-core
static void toJson(VertxOptions obj, java.util.Map<String, Object> json) {
if (obj.getAddressResolverOptions() != null) {
json.put("addressResolverOptions", obj.getAddressResolverOptions().toJson());
代码示例来源:origin: io.vertx/vertx-core
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();
}
代码示例来源:origin: io.vertx/vertx-core
this.addressResolverOptions = options.getAddressResolverOptions();
this.addressResolver = new AddressResolver(this, options.getAddressResolverOptions());
this.deploymentManager = new DeploymentManager(this);
if (options.isClustered()) {
内容来源于网络,如有侵权,请联系作者删除!