软件包 | 描述 |
---|---|
io.netty.resolver |
将表示端点名称的任意字符串解析为地址。
|
io.netty.resolver.dns |
Java的内置域名查找机制的一种替代方法,可以异步解析域名,同样支持任意DNS记录类型的查询。
|
Modifier and Type | Class and Description |
---|---|
class |
CompositeNameResolver<T>
一个组合 SimpleNameResolver ,根据NameResolver 的序列解析主机名。
|
class |
DefaultNameResolver
一个使用JDK的内置域名查找机制解决的 InetNameResolver 。
|
class |
InetNameResolver
解决 InetAddress 骨架NameResolver 实现。
|
class |
RoundRobinInetAddressResolver
A NameResolver 解析InetAddress 并通过在SimpleNameResolver.resolve(String) 和SimpleNameResolver.resolve(String, Promise) 中随机选择单个地址(如果NameResolver 返回多个地址)来强制循环播放 。
|
class |
SimpleNameResolver<T>
一个骨架 NameResolver 的实现。
|
Constructor and Description |
---|
CompositeNameResolver(EventExecutor executor, NameResolver<T>... resolvers) |
InetSocketAddressResolver(EventExecutor executor, NameResolver<java.net.InetAddress> nameResolver) |
RoundRobinInetAddressResolver(EventExecutor executor, NameResolver<java.net.InetAddress> nameResolver) |
Modifier and Type | Class and Description |
---|---|
class |
DnsNameResolver
基于DNS的 InetNameResolver 。
|
Modifier and Type | Method and Description |
---|---|
protected NameResolver<java.net.InetAddress> |
DnsAddressResolverGroup.newNameResolver(EventLoop eventLoop, ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider)
创建一个新的 NameResolver 。
|
Modifier and Type | Method and Description |
---|---|
protected AddressResolver<java.net.InetSocketAddress> |
RoundRobinDnsAddressResolverGroup.newAddressResolver(EventLoop eventLoop, NameResolver<java.net.InetAddress> resolver)
我们需要重写此方法,而不是
DnsAddressResolverGroup.newNameResolver(EventLoop, ChannelFactory, DnsServerAddressStreamProvider) ,因为我们需要消除可能缓存
resolve(java.lang.String) 通过
InflightNameResolver 中创建
DnsAddressResolverGroup.newResolver(EventLoop, ChannelFactory, DnsServerAddressStreamProvider) 。
|
protected AddressResolver<java.net.InetSocketAddress> |
DnsAddressResolverGroup.newAddressResolver(EventLoop eventLoop, NameResolver<java.net.InetAddress> resolver)
创建一个新的 AddressResolver 。
|
Copyright © 2008–2018 The Netty Project. All rights reserved.