Remove @UnstableApi annotation from resolver-* (#9952)
Motivation: The resolver API and implementations should be considered stable by now so we should not mark these with @UnstableApi Modifications: Remove @UnstableApi annotation from API and implementation of resolver Result: Make it explicit that the API is considered stable
This commit is contained in:
parent
de690daccc
commit
776e38af88
@ -17,7 +17,4 @@
|
|||||||
/**
|
/**
|
||||||
* MacOS specific nameserver resolution.
|
* MacOS specific nameserver resolution.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
package io.netty.resolver.dns.macos;
|
package io.netty.resolver.dns.macos;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
@ -16,14 +16,12 @@
|
|||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cache which stores the nameservers that should be used to resolve a specific hostname.
|
* Cache which stores the nameservers that should be used to resolve a specific hostname.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface AuthoritativeDnsServerCache {
|
public interface AuthoritativeDnsServerCache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +17,6 @@ package io.netty.resolver.dns;
|
|||||||
|
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.handler.codec.dns.DnsRecord;
|
import io.netty.handler.codec.dns.DnsRecord;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
@ -30,7 +29,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
* {@link AuthoritativeDnsServerCache} implementation which delegates all operations to a wrapped {@link DnsCache}.
|
* {@link AuthoritativeDnsServerCache} implementation which delegates all operations to a wrapped {@link DnsCache}.
|
||||||
* This implementation is only present to preserve a upgrade story.
|
* This implementation is only present to preserve a upgrade story.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
final class AuthoritativeDnsServerCacheAdapter implements AuthoritativeDnsServerCache {
|
final class AuthoritativeDnsServerCacheAdapter implements AuthoritativeDnsServerCache {
|
||||||
|
|
||||||
private static final DnsRecord[] EMPTY = new DnsRecord[0];
|
private static final DnsRecord[] EMPTY = new DnsRecord[0];
|
||||||
|
@ -18,7 +18,6 @@ package io.netty.resolver.dns;
|
|||||||
import io.netty.channel.ChannelFuture;
|
import io.netty.channel.ChannelFuture;
|
||||||
import io.netty.handler.codec.dns.DnsQuestion;
|
import io.netty.handler.codec.dns.DnsQuestion;
|
||||||
import io.netty.handler.codec.dns.DnsResponseCode;
|
import io.netty.handler.codec.dns.DnsResponseCode;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -28,7 +27,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
/**
|
/**
|
||||||
* Combines two {@link DnsQueryLifecycleObserver} into a single {@link DnsQueryLifecycleObserver}.
|
* Combines two {@link DnsQueryLifecycleObserver} into a single {@link DnsQueryLifecycleObserver}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class BiDnsQueryLifecycleObserver implements DnsQueryLifecycleObserver {
|
public final class BiDnsQueryLifecycleObserver implements DnsQueryLifecycleObserver {
|
||||||
private final DnsQueryLifecycleObserver a;
|
private final DnsQueryLifecycleObserver a;
|
||||||
private final DnsQueryLifecycleObserver b;
|
private final DnsQueryLifecycleObserver b;
|
||||||
|
@ -16,14 +16,12 @@
|
|||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.handler.codec.dns.DnsQuestion;
|
import io.netty.handler.codec.dns.DnsQuestion;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Combines two {@link DnsQueryLifecycleObserverFactory} into a single {@link DnsQueryLifecycleObserverFactory}.
|
* Combines two {@link DnsQueryLifecycleObserverFactory} into a single {@link DnsQueryLifecycleObserverFactory}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class BiDnsQueryLifecycleObserverFactory implements DnsQueryLifecycleObserverFactory {
|
public final class BiDnsQueryLifecycleObserverFactory implements DnsQueryLifecycleObserverFactory {
|
||||||
private final DnsQueryLifecycleObserverFactory a;
|
private final DnsQueryLifecycleObserverFactory a;
|
||||||
private final DnsQueryLifecycleObserverFactory b;
|
private final DnsQueryLifecycleObserverFactory b;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
@ -30,7 +29,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
/**
|
/**
|
||||||
* Default implementation of {@link AuthoritativeDnsServerCache}, backed by a {@link ConcurrentMap}.
|
* Default implementation of {@link AuthoritativeDnsServerCache}, backed by a {@link ConcurrentMap}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public class DefaultAuthoritativeDnsServerCache implements AuthoritativeDnsServerCache {
|
public class DefaultAuthoritativeDnsServerCache implements AuthoritativeDnsServerCache {
|
||||||
|
|
||||||
private final int minTtl;
|
private final int minTtl;
|
||||||
|
@ -18,7 +18,6 @@ package io.netty.resolver.dns;
|
|||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.handler.codec.dns.DnsRecord;
|
import io.netty.handler.codec.dns.DnsRecord;
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -32,7 +31,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
* Default implementation of {@link DnsCache}, backed by a {@link ConcurrentMap}.
|
* Default implementation of {@link DnsCache}, backed by a {@link ConcurrentMap}.
|
||||||
* If any additional {@link DnsRecord} is used, no caching takes place.
|
* If any additional {@link DnsRecord} is used, no caching takes place.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public class DefaultDnsCache implements DnsCache {
|
public class DefaultDnsCache implements DnsCache {
|
||||||
|
|
||||||
private final Cache<DefaultDnsCacheEntry> resolveCache = new Cache<DefaultDnsCacheEntry>() {
|
private final Cache<DefaultDnsCacheEntry> resolveCache = new Cache<DefaultDnsCacheEntry>() {
|
||||||
|
@ -17,7 +17,6 @@ package io.netty.resolver.dns;
|
|||||||
|
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.util.AsciiString;
|
import io.netty.util.AsciiString;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -28,7 +27,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
/**
|
/**
|
||||||
* Default implementation of a {@link DnsCnameCache}.
|
* Default implementation of a {@link DnsCnameCache}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class DefaultDnsCnameCache implements DnsCnameCache {
|
public final class DefaultDnsCnameCache implements DnsCnameCache {
|
||||||
private final int minTtl;
|
private final int minTtl;
|
||||||
private final int maxTtl;
|
private final int maxTtl;
|
||||||
|
@ -18,7 +18,6 @@ package io.netty.resolver.dns;
|
|||||||
import io.netty.util.NetUtil;
|
import io.netty.util.NetUtil;
|
||||||
import io.netty.util.internal.PlatformDependent;
|
import io.netty.util.internal.PlatformDependent;
|
||||||
import io.netty.util.internal.SocketUtils;
|
import io.netty.util.internal.SocketUtils;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -37,7 +36,6 @@ import static io.netty.resolver.dns.DnsServerAddresses.sequential;
|
|||||||
* <p>
|
* <p>
|
||||||
* This may use the JDK's blocking DNS resolution to bootstrap the default DNS server addresses.
|
* This may use the JDK's blocking DNS resolution to bootstrap the default DNS server addresses.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class DefaultDnsServerAddressStreamProvider implements DnsServerAddressStreamProvider {
|
public final class DefaultDnsServerAddressStreamProvider implements DnsServerAddressStreamProvider {
|
||||||
private static final InternalLogger logger =
|
private static final InternalLogger logger =
|
||||||
InternalLoggerFactory.getInstance(DefaultDnsServerAddressStreamProvider.class);
|
InternalLoggerFactory.getInstance(DefaultDnsServerAddressStreamProvider.class);
|
||||||
|
@ -26,7 +26,6 @@ import io.netty.resolver.NameResolver;
|
|||||||
import io.netty.util.concurrent.EventExecutor;
|
import io.netty.util.concurrent.EventExecutor;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
@ -37,7 +36,6 @@ import java.util.concurrent.ConcurrentMap;
|
|||||||
/**
|
/**
|
||||||
* A {@link AddressResolverGroup} of {@link DnsNameResolver}s.
|
* A {@link AddressResolverGroup} of {@link DnsNameResolver}s.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public class DnsAddressResolverGroup extends AddressResolverGroup<InetSocketAddress> {
|
public class DnsAddressResolverGroup extends AddressResolverGroup<InetSocketAddress> {
|
||||||
|
|
||||||
private final DnsNameResolverBuilder dnsResolverBuilder;
|
private final DnsNameResolverBuilder dnsResolverBuilder;
|
||||||
|
@ -17,7 +17,6 @@ package io.netty.resolver.dns;
|
|||||||
|
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.handler.codec.dns.DnsRecord;
|
import io.netty.handler.codec.dns.DnsRecord;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -25,7 +24,6 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* A cache for DNS resolution entries.
|
* A cache for DNS resolution entries.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface DnsCache {
|
public interface DnsCache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,14 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the results from a previous DNS query which can be cached.
|
* Represents the results from a previous DNS query which can be cached.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface DnsCacheEntry {
|
public interface DnsCacheEntry {
|
||||||
/**
|
/**
|
||||||
* Get the resolved address.
|
* Get the resolved address.
|
||||||
|
@ -16,12 +16,10 @@
|
|||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A cache for {@code CNAME}s.
|
* A cache for {@code CNAME}s.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface DnsCnameCache {
|
public interface DnsCnameCache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +59,6 @@ import io.netty.util.concurrent.Promise;
|
|||||||
import io.netty.util.internal.EmptyArrays;
|
import io.netty.util.internal.EmptyArrays;
|
||||||
import io.netty.util.internal.PlatformDependent;
|
import io.netty.util.internal.PlatformDependent;
|
||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -88,7 +87,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
/**
|
/**
|
||||||
* A DNS-based {@link InetNameResolver}.
|
* A DNS-based {@link InetNameResolver}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public class DnsNameResolver extends InetNameResolver {
|
public class DnsNameResolver extends InetNameResolver {
|
||||||
|
|
||||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(DnsNameResolver.class);
|
private static final InternalLogger logger = InternalLoggerFactory.getInstance(DnsNameResolver.class);
|
||||||
|
@ -24,7 +24,6 @@ import io.netty.channel.socket.SocketChannel;
|
|||||||
import io.netty.resolver.HostsFileEntriesResolver;
|
import io.netty.resolver.HostsFileEntriesResolver;
|
||||||
import io.netty.resolver.ResolvedAddressTypes;
|
import io.netty.resolver.ResolvedAddressTypes;
|
||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -37,7 +36,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
/**
|
/**
|
||||||
* A {@link DnsNameResolver} builder.
|
* A {@link DnsNameResolver} builder.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class DnsNameResolverBuilder {
|
public final class DnsNameResolverBuilder {
|
||||||
private EventLoop eventLoop;
|
private EventLoop eventLoop;
|
||||||
private ChannelFactory<? extends DatagramChannel> channelFactory;
|
private ChannelFactory<? extends DatagramChannel> channelFactory;
|
||||||
|
@ -19,14 +19,12 @@ import static java.util.Objects.requireNonNull;
|
|||||||
|
|
||||||
import io.netty.handler.codec.dns.DnsQuestion;
|
import io.netty.handler.codec.dns.DnsQuestion;
|
||||||
import io.netty.util.internal.EmptyArrays;
|
import io.netty.util.internal.EmptyArrays;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link RuntimeException} raised when {@link DnsNameResolver} failed to perform a successful query.
|
* A {@link RuntimeException} raised when {@link DnsNameResolver} failed to perform a successful query.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public class DnsNameResolverException extends RuntimeException {
|
public class DnsNameResolverException extends RuntimeException {
|
||||||
|
|
||||||
private static final long serialVersionUID = -8826717909627131850L;
|
private static final long serialVersionUID = -8826717909627131850L;
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.handler.codec.dns.DnsQuestion;
|
import io.netty.handler.codec.dns.DnsQuestion;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
@ -24,7 +23,6 @@ import java.net.InetSocketAddress;
|
|||||||
* A {@link DnsNameResolverException} raised when {@link DnsNameResolver} failed to perform a successful query because
|
* A {@link DnsNameResolverException} raised when {@link DnsNameResolver} failed to perform a successful query because
|
||||||
* of an timeout. In this case you may want to retry the operation.
|
* of an timeout. In this case you may want to retry the operation.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class DnsNameResolverTimeoutException extends DnsNameResolverException {
|
public final class DnsNameResolverTimeoutException extends DnsNameResolverException {
|
||||||
private static final long serialVersionUID = -8826717969627131854L;
|
private static final long serialVersionUID = -8826717969627131854L;
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ import io.netty.channel.ChannelFuture;
|
|||||||
import io.netty.handler.codec.dns.DnsQuestion;
|
import io.netty.handler.codec.dns.DnsQuestion;
|
||||||
import io.netty.handler.codec.dns.DnsRecordType;
|
import io.netty.handler.codec.dns.DnsRecordType;
|
||||||
import io.netty.handler.codec.dns.DnsResponseCode;
|
import io.netty.handler.codec.dns.DnsResponseCode;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -43,7 +42,6 @@ import java.util.List;
|
|||||||
* return an object of type {@link DnsQueryLifecycleObserver}. Implementations may use this to build a query tree to
|
* return an object of type {@link DnsQueryLifecycleObserver}. Implementations may use this to build a query tree to
|
||||||
* understand the "sub queries" generated by a single query.
|
* understand the "sub queries" generated by a single query.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface DnsQueryLifecycleObserver {
|
public interface DnsQueryLifecycleObserver {
|
||||||
/**
|
/**
|
||||||
* The query has been written.
|
* The query has been written.
|
||||||
|
@ -16,12 +16,10 @@
|
|||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.handler.codec.dns.DnsQuestion;
|
import io.netty.handler.codec.dns.DnsQuestion;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to generate new instances of {@link DnsQueryLifecycleObserver}.
|
* Used to generate new instances of {@link DnsQueryLifecycleObserver}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface DnsQueryLifecycleObserverFactory {
|
public interface DnsQueryLifecycleObserverFactory {
|
||||||
/**
|
/**
|
||||||
* Create a new instance of a {@link DnsQueryLifecycleObserver}. This will be called at the start of a new query.
|
* Create a new instance of a {@link DnsQueryLifecycleObserver}. This will be called at the start of a new query.
|
||||||
|
@ -16,14 +16,11 @@
|
|||||||
|
|
||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An infinite stream of DNS server addresses.
|
* An infinite stream of DNS server addresses.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface DnsServerAddressStream {
|
public interface DnsServerAddressStream {
|
||||||
/**
|
/**
|
||||||
* Retrieves the next DNS server address from the stream.
|
* Retrieves the next DNS server address from the stream.
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides an opportunity to override which {@link DnsServerAddressStream} is used to resolve a specific hostname.
|
* Provides an opportunity to override which {@link DnsServerAddressStream} is used to resolve a specific hostname.
|
||||||
* <p>
|
* <p>
|
||||||
@ -24,7 +22,6 @@ import io.netty.util.internal.UnstableApi;
|
|||||||
* <a href="https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html">
|
* <a href="https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html">
|
||||||
* /etc/resolver</a>.
|
* /etc/resolver</a>.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface DnsServerAddressStreamProvider {
|
public interface DnsServerAddressStreamProvider {
|
||||||
/**
|
/**
|
||||||
* Ask this provider for the name servers to query for {@code hostname}.
|
* Ask this provider for the name servers to query for {@code hostname}.
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.util.internal.PlatformDependent;
|
import io.netty.util.internal.PlatformDependent;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
import java.util.concurrent.atomic.AtomicLong;
|
||||||
@ -24,7 +23,6 @@ import java.util.concurrent.atomic.AtomicLong;
|
|||||||
/**
|
/**
|
||||||
* Utility methods related to {@link DnsServerAddressStreamProvider}.
|
* Utility methods related to {@link DnsServerAddressStreamProvider}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class DnsServerAddressStreamProviders {
|
public final class DnsServerAddressStreamProviders {
|
||||||
// We use 5 minutes which is the same as what OpenJDK is using in sun.net.dns.ResolverConfigurationImpl.
|
// We use 5 minutes which is the same as what OpenJDK is using in sun.net.dns.ResolverConfigurationImpl.
|
||||||
private static final long REFRESH_INTERVAL = TimeUnit.MINUTES.toNanos(5);
|
private static final long REFRESH_INTERVAL = TimeUnit.MINUTES.toNanos(5);
|
||||||
|
@ -18,8 +18,6 @@ package io.netty.resolver.dns;
|
|||||||
|
|
||||||
import static java.util.Objects.requireNonNull;
|
import static java.util.Objects.requireNonNull;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -28,7 +26,6 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Provides an infinite sequence of DNS server addresses to {@link DnsNameResolver}.
|
* Provides an infinite sequence of DNS server addresses to {@link DnsNameResolver}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
@SuppressWarnings("IteratorNextCanNotThrowNoSuchElementException")
|
@SuppressWarnings("IteratorNextCanNotThrowNoSuchElementException")
|
||||||
public abstract class DnsServerAddresses {
|
public abstract class DnsServerAddresses {
|
||||||
/**
|
/**
|
||||||
|
@ -15,15 +15,12 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link DnsServerAddressStreamProvider} which iterates through a collection of
|
* A {@link DnsServerAddressStreamProvider} which iterates through a collection of
|
||||||
* {@link DnsServerAddressStreamProvider} until the first non-{@code null} result is found.
|
* {@link DnsServerAddressStreamProvider} until the first non-{@code null} result is found.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class MultiDnsServerAddressStreamProvider implements DnsServerAddressStreamProvider {
|
public final class MultiDnsServerAddressStreamProvider implements DnsServerAddressStreamProvider {
|
||||||
private final DnsServerAddressStreamProvider[] providers;
|
private final DnsServerAddressStreamProvider[] providers;
|
||||||
|
|
||||||
|
@ -16,14 +16,12 @@
|
|||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A noop {@link AuthoritativeDnsServerCache} that actually never caches anything.
|
* A noop {@link AuthoritativeDnsServerCache} that actually never caches anything.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class NoopAuthoritativeDnsServerCache implements AuthoritativeDnsServerCache {
|
public final class NoopAuthoritativeDnsServerCache implements AuthoritativeDnsServerCache {
|
||||||
public static final NoopAuthoritativeDnsServerCache INSTANCE = new NoopAuthoritativeDnsServerCache();
|
public static final NoopAuthoritativeDnsServerCache INSTANCE = new NoopAuthoritativeDnsServerCache();
|
||||||
|
|
||||||
|
@ -17,7 +17,6 @@ package io.netty.resolver.dns;
|
|||||||
|
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.handler.codec.dns.DnsRecord;
|
import io.netty.handler.codec.dns.DnsRecord;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -26,7 +25,6 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* A noop DNS cache that actually never caches anything.
|
* A noop DNS cache that actually never caches anything.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class NoopDnsCache implements DnsCache {
|
public final class NoopDnsCache implements DnsCache {
|
||||||
|
|
||||||
public static final NoopDnsCache INSTANCE = new NoopDnsCache();
|
public static final NoopDnsCache INSTANCE = new NoopDnsCache();
|
||||||
|
@ -16,9 +16,7 @@
|
|||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.channel.EventLoop;
|
import io.netty.channel.EventLoop;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
@UnstableApi
|
|
||||||
public final class NoopDnsCnameCache implements DnsCnameCache {
|
public final class NoopDnsCnameCache implements DnsCnameCache {
|
||||||
|
|
||||||
public static final NoopDnsCnameCache INSTANCE = new NoopDnsCnameCache();
|
public static final NoopDnsCnameCache INSTANCE = new NoopDnsCnameCache();
|
||||||
|
@ -16,9 +16,7 @@
|
|||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.handler.codec.dns.DnsQuestion;
|
import io.netty.handler.codec.dns.DnsQuestion;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
@UnstableApi
|
|
||||||
public final class NoopDnsQueryLifecycleObserverFactory implements DnsQueryLifecycleObserverFactory {
|
public final class NoopDnsQueryLifecycleObserverFactory implements DnsQueryLifecycleObserverFactory {
|
||||||
public static final NoopDnsQueryLifecycleObserverFactory INSTANCE = new NoopDnsQueryLifecycleObserverFactory();
|
public static final NoopDnsQueryLifecycleObserverFactory INSTANCE = new NoopDnsQueryLifecycleObserverFactory();
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@ import io.netty.resolver.AddressResolver;
|
|||||||
import io.netty.resolver.AddressResolverGroup;
|
import io.netty.resolver.AddressResolverGroup;
|
||||||
import io.netty.resolver.NameResolver;
|
import io.netty.resolver.NameResolver;
|
||||||
import io.netty.resolver.RoundRobinInetAddressResolver;
|
import io.netty.resolver.RoundRobinInetAddressResolver;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
@ -33,7 +32,6 @@ import java.net.InetSocketAddress;
|
|||||||
* multiple are provided by the nameserver. This is ideal for use in applications that use a pool of connections, for
|
* multiple are provided by the nameserver. This is ideal for use in applications that use a pool of connections, for
|
||||||
* which connecting to a single resolved address would be inefficient.
|
* which connecting to a single resolved address would be inefficient.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public class RoundRobinDnsAddressResolverGroup extends DnsAddressResolverGroup {
|
public class RoundRobinDnsAddressResolverGroup extends DnsAddressResolverGroup {
|
||||||
|
|
||||||
public RoundRobinDnsAddressResolverGroup(DnsNameResolverBuilder dnsResolverBuilder) {
|
public RoundRobinDnsAddressResolverGroup(DnsNameResolverBuilder dnsResolverBuilder) {
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
import static io.netty.resolver.dns.DnsServerAddresses.sequential;
|
import static io.netty.resolver.dns.DnsServerAddresses.sequential;
|
||||||
@ -24,7 +22,6 @@ import static io.netty.resolver.dns.DnsServerAddresses.sequential;
|
|||||||
/**
|
/**
|
||||||
* A {@link DnsServerAddressStreamProvider} which is backed by a sequential list of DNS servers.
|
* A {@link DnsServerAddressStreamProvider} which is backed by a sequential list of DNS servers.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class SequentialDnsServerAddressStreamProvider extends UniSequentialDnsServerAddressStreamProvider {
|
public final class SequentialDnsServerAddressStreamProvider extends UniSequentialDnsServerAddressStreamProvider {
|
||||||
/**
|
/**
|
||||||
* Create a new instance.
|
* Create a new instance.
|
||||||
|
@ -15,14 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link DnsServerAddressStreamProvider} which always uses a single DNS server for resolution.
|
* A {@link DnsServerAddressStreamProvider} which always uses a single DNS server for resolution.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class SingletonDnsServerAddressStreamProvider extends UniSequentialDnsServerAddressStreamProvider {
|
public final class SingletonDnsServerAddressStreamProvider extends UniSequentialDnsServerAddressStreamProvider {
|
||||||
/**
|
/**
|
||||||
* Create a new instance.
|
* Create a new instance.
|
||||||
|
@ -17,7 +17,6 @@ package io.netty.resolver.dns;
|
|||||||
|
|
||||||
import io.netty.util.NetUtil;
|
import io.netty.util.NetUtil;
|
||||||
import io.netty.util.internal.SocketUtils;
|
import io.netty.util.internal.SocketUtils;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -45,7 +44,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
* <a href="https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html">
|
* <a href="https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man5/resolver.5.html">
|
||||||
* /etc/resolver</a> to respect the system default domain servers.
|
* /etc/resolver</a> to respect the system default domain servers.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class UnixResolverDnsServerAddressStreamProvider implements DnsServerAddressStreamProvider {
|
public final class UnixResolverDnsServerAddressStreamProvider implements DnsServerAddressStreamProvider {
|
||||||
private static final InternalLogger logger =
|
private static final InternalLogger logger =
|
||||||
InternalLoggerFactory.getInstance(UnixResolverDnsServerAddressStreamProvider.class);
|
InternalLoggerFactory.getInstance(UnixResolverDnsServerAddressStreamProvider.class);
|
||||||
|
@ -18,7 +18,4 @@
|
|||||||
* An alternative to Java's built-in domain name lookup mechanism that resolves a domain name asynchronously,
|
* An alternative to Java's built-in domain name lookup mechanism that resolves a domain name asynchronously,
|
||||||
* which supports the queries of an arbitrary DNS record type as well.
|
* which supports the queries of an arbitrary DNS record type as well.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
package io.netty.resolver.dns;
|
package io.netty.resolver.dns;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
@ -20,7 +20,6 @@ import io.netty.util.concurrent.EventExecutor;
|
|||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
import io.netty.util.internal.TypeParameterMatcher;
|
import io.netty.util.internal.TypeParameterMatcher;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
import java.nio.channels.UnsupportedAddressTypeException;
|
import java.nio.channels.UnsupportedAddressTypeException;
|
||||||
@ -32,7 +31,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
/**
|
/**
|
||||||
* A skeletal {@link AddressResolver} implementation.
|
* A skeletal {@link AddressResolver} implementation.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public abstract class AbstractAddressResolver<T extends SocketAddress> implements AddressResolver<T> {
|
public abstract class AbstractAddressResolver<T extends SocketAddress> implements AddressResolver<T> {
|
||||||
|
|
||||||
private final EventExecutor executor;
|
private final EventExecutor executor;
|
||||||
|
@ -17,7 +17,6 @@ package io.netty.resolver;
|
|||||||
|
|
||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
@ -27,7 +26,6 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Resolves a possibility unresolved {@link SocketAddress}.
|
* Resolves a possibility unresolved {@link SocketAddress}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface AddressResolver<T extends SocketAddress> extends Closeable {
|
public interface AddressResolver<T extends SocketAddress> extends Closeable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -20,7 +20,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
|
|
||||||
import io.netty.util.concurrent.EventExecutor;
|
import io.netty.util.concurrent.EventExecutor;
|
||||||
import io.netty.util.concurrent.FutureListener;
|
import io.netty.util.concurrent.FutureListener;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -33,7 +32,6 @@ import java.util.concurrent.ConcurrentMap;
|
|||||||
/**
|
/**
|
||||||
* Creates and manages {@link NameResolver}s so that each {@link EventExecutor} has its own resolver instance.
|
* Creates and manages {@link NameResolver}s so that each {@link EventExecutor} has its own resolver instance.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public abstract class AddressResolverGroup<T extends SocketAddress> implements Closeable {
|
public abstract class AddressResolverGroup<T extends SocketAddress> implements Closeable {
|
||||||
|
|
||||||
private static final InternalLogger logger = InternalLoggerFactory.getInstance(AddressResolverGroup.class);
|
private static final InternalLogger logger = InternalLoggerFactory.getInstance(AddressResolverGroup.class);
|
||||||
|
@ -19,7 +19,6 @@ import io.netty.util.concurrent.EventExecutor;
|
|||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.concurrent.FutureListener;
|
import io.netty.util.concurrent.FutureListener;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -31,7 +30,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
*
|
*
|
||||||
* In case of a failure, only the last one will be reported.
|
* In case of a failure, only the last one will be reported.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class CompositeNameResolver<T> extends SimpleNameResolver<T> {
|
public final class CompositeNameResolver<T> extends SimpleNameResolver<T> {
|
||||||
|
|
||||||
private final NameResolver<T>[] resolvers;
|
private final NameResolver<T>[] resolvers;
|
||||||
|
@ -17,14 +17,12 @@
|
|||||||
package io.netty.resolver;
|
package io.netty.resolver;
|
||||||
|
|
||||||
import io.netty.util.concurrent.EventExecutor;
|
import io.netty.util.concurrent.EventExecutor;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link AddressResolverGroup} of {@link DefaultNameResolver}s.
|
* A {@link AddressResolverGroup} of {@link DefaultNameResolver}s.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class DefaultAddressResolverGroup extends AddressResolverGroup<InetSocketAddress> {
|
public final class DefaultAddressResolverGroup extends AddressResolverGroup<InetSocketAddress> {
|
||||||
|
|
||||||
public static final DefaultAddressResolverGroup INSTANCE = new DefaultAddressResolverGroup();
|
public static final DefaultAddressResolverGroup INSTANCE = new DefaultAddressResolverGroup();
|
||||||
|
@ -17,7 +17,6 @@ package io.netty.resolver;
|
|||||||
|
|
||||||
import io.netty.util.CharsetUtil;
|
import io.netty.util.CharsetUtil;
|
||||||
import io.netty.util.internal.PlatformDependent;
|
import io.netty.util.internal.PlatformDependent;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
import java.net.Inet6Address;
|
import java.net.Inet6Address;
|
||||||
@ -29,7 +28,6 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* Default {@link HostsFileEntriesResolver} that resolves hosts file entries only once.
|
* Default {@link HostsFileEntriesResolver} that resolves hosts file entries only once.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class DefaultHostsFileEntriesResolver implements HostsFileEntriesResolver {
|
public final class DefaultHostsFileEntriesResolver implements HostsFileEntriesResolver {
|
||||||
|
|
||||||
private final Map<String, Inet4Address> inet4Entries;
|
private final Map<String, Inet4Address> inet4Entries;
|
||||||
|
@ -19,7 +19,6 @@ package io.netty.resolver;
|
|||||||
import io.netty.util.internal.SocketUtils;
|
import io.netty.util.internal.SocketUtils;
|
||||||
import io.netty.util.concurrent.EventExecutor;
|
import io.netty.util.concurrent.EventExecutor;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
@ -30,7 +29,6 @@ import java.util.List;
|
|||||||
* A {@link InetNameResolver} that resolves using JDK's built-in domain name lookup mechanism.
|
* A {@link InetNameResolver} that resolves using JDK's built-in domain name lookup mechanism.
|
||||||
* Note that this resolver performs a blocking name lookup from the caller thread.
|
* Note that this resolver performs a blocking name lookup from the caller thread.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public class DefaultNameResolver extends InetNameResolver {
|
public class DefaultNameResolver extends InetNameResolver {
|
||||||
|
|
||||||
public DefaultNameResolver(EventExecutor executor) {
|
public DefaultNameResolver(EventExecutor executor) {
|
||||||
|
@ -15,8 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.resolver;
|
package io.netty.resolver;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
import java.net.Inet6Address;
|
import java.net.Inet6Address;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -26,7 +24,6 @@ import java.util.Map;
|
|||||||
/**
|
/**
|
||||||
* A container of hosts file entries
|
* A container of hosts file entries
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class HostsFileEntries {
|
public final class HostsFileEntries {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -15,14 +15,11 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.resolver;
|
package io.netty.resolver;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resolves a hostname against the hosts file entries.
|
* Resolves a hostname against the hosts file entries.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface HostsFileEntriesResolver {
|
public interface HostsFileEntriesResolver {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,7 +17,6 @@ package io.netty.resolver;
|
|||||||
|
|
||||||
import io.netty.util.NetUtil;
|
import io.netty.util.NetUtil;
|
||||||
import io.netty.util.internal.PlatformDependent;
|
import io.netty.util.internal.PlatformDependent;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
import io.netty.util.internal.logging.InternalLogger;
|
import io.netty.util.internal.logging.InternalLogger;
|
||||||
import io.netty.util.internal.logging.InternalLoggerFactory;
|
import io.netty.util.internal.logging.InternalLoggerFactory;
|
||||||
|
|
||||||
@ -43,7 +42,6 @@ import static java.util.Objects.requireNonNull;
|
|||||||
/**
|
/**
|
||||||
* A parser for hosts files.
|
* A parser for hosts files.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class HostsFileParser {
|
public final class HostsFileParser {
|
||||||
|
|
||||||
private static final String WINDOWS_DEFAULT_SYSTEM_ROOT = "C:\\Windows";
|
private static final String WINDOWS_DEFAULT_SYSTEM_ROOT = "C:\\Windows";
|
||||||
|
@ -17,7 +17,6 @@ package io.netty.resolver;
|
|||||||
|
|
||||||
import io.netty.util.concurrent.EventExecutor;
|
import io.netty.util.concurrent.EventExecutor;
|
||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
@ -25,7 +24,6 @@ import java.net.InetSocketAddress;
|
|||||||
/**
|
/**
|
||||||
* A skeletal {@link NameResolver} implementation that resolves {@link InetAddress}.
|
* A skeletal {@link NameResolver} implementation that resolves {@link InetAddress}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public abstract class InetNameResolver extends SimpleNameResolver<InetAddress> {
|
public abstract class InetNameResolver extends SimpleNameResolver<InetAddress> {
|
||||||
private volatile AddressResolver<InetSocketAddress> addressResolver;
|
private volatile AddressResolver<InetSocketAddress> addressResolver;
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@ import io.netty.util.concurrent.EventExecutor;
|
|||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.concurrent.FutureListener;
|
import io.netty.util.concurrent.FutureListener;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
@ -29,7 +28,6 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* A {@link AbstractAddressResolver} that resolves {@link InetSocketAddress}.
|
* A {@link AbstractAddressResolver} that resolves {@link InetSocketAddress}.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public class InetSocketAddressResolver extends AbstractAddressResolver<InetSocketAddress> {
|
public class InetSocketAddressResolver extends AbstractAddressResolver<InetSocketAddress> {
|
||||||
|
|
||||||
final NameResolver<InetAddress> nameResolver;
|
final NameResolver<InetAddress> nameResolver;
|
||||||
|
@ -18,7 +18,6 @@ package io.netty.resolver;
|
|||||||
|
|
||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -26,7 +25,6 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Resolves an arbitrary string that represents the name of an endpoint into an address.
|
* Resolves an arbitrary string that represents the name of an endpoint into an address.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public interface NameResolver<T> extends Closeable {
|
public interface NameResolver<T> extends Closeable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -18,7 +18,6 @@ package io.netty.resolver;
|
|||||||
|
|
||||||
import io.netty.util.concurrent.EventExecutor;
|
import io.netty.util.concurrent.EventExecutor;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -28,7 +27,6 @@ import java.util.List;
|
|||||||
* A {@link AddressResolver} that does not perform any resolution but always reports successful resolution.
|
* A {@link AddressResolver} that does not perform any resolution but always reports successful resolution.
|
||||||
* This resolver is useful when name resolution is performed by a handler in a pipeline, such as a proxy handler.
|
* This resolver is useful when name resolution is performed by a handler in a pipeline, such as a proxy handler.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public class NoopAddressResolver extends AbstractAddressResolver<SocketAddress> {
|
public class NoopAddressResolver extends AbstractAddressResolver<SocketAddress> {
|
||||||
|
|
||||||
public NoopAddressResolver(EventExecutor executor) {
|
public NoopAddressResolver(EventExecutor executor) {
|
||||||
|
@ -17,14 +17,12 @@
|
|||||||
package io.netty.resolver;
|
package io.netty.resolver;
|
||||||
|
|
||||||
import io.netty.util.concurrent.EventExecutor;
|
import io.netty.util.concurrent.EventExecutor;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.SocketAddress;
|
import java.net.SocketAddress;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A {@link AddressResolverGroup} of {@link NoopAddressResolver}s.
|
* A {@link AddressResolverGroup} of {@link NoopAddressResolver}s.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public final class NoopAddressResolverGroup extends AddressResolverGroup<SocketAddress> {
|
public final class NoopAddressResolverGroup extends AddressResolverGroup<SocketAddress> {
|
||||||
|
|
||||||
public static final NoopAddressResolverGroup INSTANCE = new NoopAddressResolverGroup();
|
public static final NoopAddressResolverGroup INSTANCE = new NoopAddressResolverGroup();
|
||||||
|
@ -15,12 +15,9 @@
|
|||||||
*/
|
*/
|
||||||
package io.netty.resolver;
|
package io.netty.resolver;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Defined resolved address types.
|
* Defined resolved address types.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public enum ResolvedAddressTypes {
|
public enum ResolvedAddressTypes {
|
||||||
/**
|
/**
|
||||||
* Only resolve IPv4 addresses
|
* Only resolve IPv4 addresses
|
||||||
|
@ -19,7 +19,6 @@ import io.netty.util.concurrent.EventExecutor;
|
|||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.concurrent.FutureListener;
|
import io.netty.util.concurrent.FutureListener;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
@ -35,7 +34,6 @@ import java.util.concurrent.ThreadLocalRandom;
|
|||||||
* if multiple are returned by the {@link NameResolver}.
|
* if multiple are returned by the {@link NameResolver}.
|
||||||
* Use {@link #asAddressResolver()} to create a {@link InetSocketAddress} resolver
|
* Use {@link #asAddressResolver()} to create a {@link InetSocketAddress} resolver
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public class RoundRobinInetAddressResolver extends InetNameResolver {
|
public class RoundRobinInetAddressResolver extends InetNameResolver {
|
||||||
private final NameResolver<InetAddress> nameResolver;
|
private final NameResolver<InetAddress> nameResolver;
|
||||||
|
|
||||||
|
@ -21,14 +21,12 @@ import static java.util.Objects.requireNonNull;
|
|||||||
import io.netty.util.concurrent.EventExecutor;
|
import io.netty.util.concurrent.EventExecutor;
|
||||||
import io.netty.util.concurrent.Future;
|
import io.netty.util.concurrent.Future;
|
||||||
import io.netty.util.concurrent.Promise;
|
import io.netty.util.concurrent.Promise;
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A skeletal {@link NameResolver} implementation.
|
* A skeletal {@link NameResolver} implementation.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
public abstract class SimpleNameResolver<T> implements NameResolver<T> {
|
public abstract class SimpleNameResolver<T> implements NameResolver<T> {
|
||||||
|
|
||||||
private final EventExecutor executor;
|
private final EventExecutor executor;
|
||||||
|
@ -17,7 +17,4 @@
|
|||||||
/**
|
/**
|
||||||
* Resolves an arbitrary string that represents the name of an endpoint into an address.
|
* Resolves an arbitrary string that represents the name of an endpoint into an address.
|
||||||
*/
|
*/
|
||||||
@UnstableApi
|
|
||||||
package io.netty.resolver;
|
package io.netty.resolver;
|
||||||
|
|
||||||
import io.netty.util.internal.UnstableApi;
|
|
||||||
|
Loading…
Reference in New Issue
Block a user