1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package io.netty5.resolver.dns;
18
19 import io.netty5.channel.ChannelFactory;
20 import io.netty5.channel.EventLoop;
21 import io.netty5.channel.socket.DatagramChannel;
22 import io.netty5.resolver.AddressResolver;
23 import io.netty5.resolver.AddressResolverGroup;
24 import io.netty5.resolver.NameResolver;
25 import io.netty5.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 }