Interface AddressResolver<T extends SocketAddress>

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
AbstractAddressResolver, InetSocketAddressResolver, NoopAddressResolver

public interface AddressResolver<T extends SocketAddress> extends Closeable
Resolves a possibility unresolved SocketAddress.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes all the resources allocated and used by this resolver.
    boolean
    Returns true if and only if the specified address has been resolved.
    boolean
    Returns true if and only if the specified address is supported by this resolved.
    io.netty.util.concurrent.Future<T>
    Resolves the specified address.
    io.netty.util.concurrent.Future<T>
    resolve(SocketAddress address, io.netty.util.concurrent.Promise<T> promise)
    Resolves the specified address.
    io.netty.util.concurrent.Future<List<T>>
    Resolves the specified address.
    io.netty.util.concurrent.Future<List<T>>
    resolveAll(SocketAddress address, io.netty.util.concurrent.Promise<List<T>> promise)
    Resolves the specified address.
  • Method Details

    • isSupported

      boolean isSupported(SocketAddress address)
      Returns true if and only if the specified address is supported by this resolved.
    • isResolved

      boolean isResolved(SocketAddress address)
      Returns true if and only if the specified address has been resolved.
      Throws:
      UnsupportedAddressTypeException - if the specified address is not supported by this resolver
    • resolve

      io.netty.util.concurrent.Future<T> resolve(SocketAddress address)
      Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.
      Parameters:
      address - the address to resolve
      Returns:
      the SocketAddress as the result of the resolution
    • resolve

      io.netty.util.concurrent.Future<T> resolve(SocketAddress address, io.netty.util.concurrent.Promise<T> promise)
      Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.
      Parameters:
      address - the address to resolve
      promise - the Promise which will be fulfilled when the name resolution is finished
      Returns:
      the SocketAddress as the result of the resolution
    • resolveAll

      io.netty.util.concurrent.Future<List<T>> resolveAll(SocketAddress address)
      Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.
      Parameters:
      address - the address to resolve
      Returns:
      the list of the SocketAddresses as the result of the resolution
    • resolveAll

      io.netty.util.concurrent.Future<List<T>> resolveAll(SocketAddress address, io.netty.util.concurrent.Promise<List<T>> promise)
      Resolves the specified address. If the specified address is resolved already, this method does nothing but returning the original address.
      Parameters:
      address - the address to resolve
      promise - the Promise which will be fulfilled when the name resolution is finished
      Returns:
      the list of the SocketAddresses as the result of the resolution
    • close

      void close()
      Closes all the resources allocated and used by this resolver.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable