public abstract class InetNameResolver extends SimpleNameResolver<InetAddress>
NameResolver implementation that resolves InetAddress.| Modifier | Constructor and Description |
|---|---|
protected |
InetNameResolver(io.netty.util.concurrent.EventExecutor executor) |
| Modifier and Type | Method and Description |
|---|---|
AddressResolver<InetSocketAddress> |
asAddressResolver()
Return a
AddressResolver that will use this name resolver underneath. |
protected InetAddress |
loopbackAddress()
Returns the
InetAddress for loopback. |
io.netty.util.concurrent.Future<InetAddress> |
resolve(String inetHost,
io.netty.util.concurrent.Promise<InetAddress> promise)
Resolves the specified name into an address.
|
io.netty.util.concurrent.Future<List<InetAddress>> |
resolveAll(String inetHost,
io.netty.util.concurrent.Promise<List<InetAddress>> promise)
Resolves the specified host name and port into a list of address.
|
close, doResolve, doResolveAll, executor, resolve, resolveAllprotected InetNameResolver(io.netty.util.concurrent.EventExecutor executor)
executor - the EventExecutor which is used to notify the listeners of the Future returned
by SimpleNameResolver.resolve(String)protected InetAddress loopbackAddress()
InetAddress for loopback.public io.netty.util.concurrent.Future<InetAddress> resolve(String inetHost, io.netty.util.concurrent.Promise<InetAddress> promise)
NameResolverresolve in interface NameResolver<InetAddress>resolve in class SimpleNameResolver<InetAddress>inetHost - the name to resolvepromise - the Promise which will be fulfilled when the name resolution is finishedpublic io.netty.util.concurrent.Future<List<InetAddress>> resolveAll(String inetHost, io.netty.util.concurrent.Promise<List<InetAddress>> promise)
NameResolverresolveAll in interface NameResolver<InetAddress>resolveAll in class SimpleNameResolver<InetAddress>inetHost - the name to resolvepromise - the Promise which will be fulfilled when the name resolution is finishedpublic AddressResolver<InetSocketAddress> asAddressResolver()
AddressResolver that will use this name resolver underneath.
It's cached internally, so the same instance is always returned.Copyright © 2008–2017 The Netty Project. All rights reserved.