Class SimpleNameResolver<T>

    • Constructor Detail

      • SimpleNameResolver

        protected SimpleNameResolver​(io.netty.util.concurrent.EventExecutor executor)
        Parameters:
        executor - the EventExecutor which is used to notify the listeners of the Future returned by resolve(String)
    • Method Detail

      • executor

        protected io.netty.util.concurrent.EventExecutor executor()
        Returns the EventExecutor which is used to notify the listeners of the Future returned by resolve(String).
      • resolve

        public final io.netty.util.concurrent.Future<T> resolve​(String inetHost)
        Description copied from interface: NameResolver
        Resolves the specified name into an address.
        Specified by:
        resolve in interface NameResolver<T>
        Parameters:
        inetHost - the name to resolve
        Returns:
        the address as the result of the resolution
      • resolve

        public io.netty.util.concurrent.Future<T> resolve​(String inetHost,
                                                          io.netty.util.concurrent.Promise<T> promise)
        Description copied from interface: NameResolver
        Resolves the specified name into an address.
        Specified by:
        resolve in interface NameResolver<T>
        Parameters:
        inetHost - the name to resolve
        promise - the Promise which will be fulfilled when the name resolution is finished
        Returns:
        the address as the result of the resolution
      • resolveAll

        public final io.netty.util.concurrent.Future<List<T>> resolveAll​(String inetHost)
        Description copied from interface: NameResolver
        Resolves the specified host name and port into a list of address.
        Specified by:
        resolveAll in interface NameResolver<T>
        Parameters:
        inetHost - the name to resolve
        Returns:
        the list of the address as the result of the resolution
      • resolveAll

        public io.netty.util.concurrent.Future<List<T>> resolveAll​(String inetHost,
                                                                   io.netty.util.concurrent.Promise<List<T>> promise)
        Description copied from interface: NameResolver
        Resolves the specified host name and port into a list of address.
        Specified by:
        resolveAll in interface NameResolver<T>
        Parameters:
        inetHost - the name to resolve
        promise - the Promise which will be fulfilled when the name resolution is finished
        Returns:
        the list of the address as the result of the resolution
      • doResolve

        protected abstract void doResolve​(String inetHost,
                                          io.netty.util.concurrent.Promise<T> promise)
                                   throws Exception
        Invoked by resolve(String) to perform the actual name resolution.
        Throws:
        Exception