1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package io.netty.resolver.dns;
18
19 import io.netty.channel.ChannelFactory;
20 import io.netty.channel.EventLoop;
21 import io.netty.channel.socket.DatagramChannel;
22 import io.netty.resolver.AddressResolver;
23 import io.netty.resolver.AddressResolverGroup;
24 import io.netty.resolver.NameResolver;
25 import io.netty.resolver.RoundRobinInetAddressResolver;
26
27 import java.net.InetAddress;
28 import java.net.InetSocketAddress;
29
30
31
32
33
34
35 public class RoundRobinDnsAddressResolverGroup extends DnsAddressResolverGroup {
36
37 public RoundRobinDnsAddressResolverGroup(DnsNameResolverBuilder dnsResolverBuilder) {
38 super(dnsResolverBuilder);
39 }
40
41 public RoundRobinDnsAddressResolverGroup(
42 Class<? extends DatagramChannel> channelType,
43 DnsServerAddressStreamProvider nameServerProvider) {
44 super(channelType, nameServerProvider);
45 }
46
47 public RoundRobinDnsAddressResolverGroup(
48 ChannelFactory<? extends DatagramChannel> channelFactory,
49 DnsServerAddressStreamProvider nameServerProvider) {
50 super(channelFactory, nameServerProvider);
51 }
52
53
54
55
56
57
58
59
60 @Override
61 protected final AddressResolver<InetSocketAddress> newAddressResolver(EventLoop eventLoop,
62 NameResolver<InetAddress> resolver)
63 throws Exception {
64 return new RoundRobinInetAddressResolver(eventLoop, resolver).asAddressResolver();
65 }
66 }